Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import macros in index.html of themes #185

Closed
Keats opened this issue Nov 24, 2017 · 8 comments
Closed

Can't import macros in index.html of themes #185

Keats opened this issue Nov 24, 2017 · 8 comments

Comments

@Keats
Copy link
Collaborator

Keats commented Nov 24, 2017

Original: Keats/tera#235

From a quick look the path do get rewritten correctly so it's not entirely clear what is happening

@Keats
Copy link
Collaborator Author

Keats commented Nov 24, 2017

Ok found the issue, Tera only use the update paths in blocks in the renderer and use the AST ImportMacro node instead otherwise which is why it works in child pages but not the index one

@Keats
Copy link
Collaborator Author

Keats commented Nov 24, 2017

@NuLL3rr0r

Keats/tera@b87a920 will fix it (tried locally). If you try the next branch, it should work

@NuLL3rr0r
Copy link

Sorry, but it seems the issue still persists for me. I even checked out the after-dark theme and it's the same. I built the next branch with head pointing to the following commit:

commit 6db79e77e84add9879fdc6808e08477f5ec58d11
Author: Vincent Prouillet <[email protected]>
Date:   Fri Nov 24 17:52:24 2017 +0100

    Update to Tera 0.11 beta

The same error:

Error: Failed to render page '/home/babaei/dev/babaei-net-blog-source/babaei.net/content/blog/2016-04-29-discourse-as-a-blog-comment-service-on-freebsd-without-docker.md'
Reason: Failed to render 'after-dark/templates/page.html' (error happened in 'after-dark/templates/index.html').
Reason: Template 'post_macros.html' not found

@Keats
Copy link
Collaborator Author

Keats commented Nov 25, 2017 via email

@NuLL3rr0r
Copy link

That did it:

Updating registry `https://github.com/rust-lang/crates.io-index`
      Adding base64 v0.8.0
    Updating humansize v1.0.1 -> v1.0.2
    Updating plist v0.2.3 -> v0.2.4
    Updating tera v0.11.0-beta.0 -> v0.11.0-beta.1
    Updating xml-rs v0.6.1 -> v0.7.0

I rebuilt Gutenberg and it worked. Thank you!

@Keats
Copy link
Collaborator Author

Keats commented Nov 27, 2017

Unrelated but if you have any opinions on #111 as you are writing in 2 languages, I'll be happy to hear them

@NuLL3rr0r
Copy link

Sure, I'll look into that and report back.

@Keats
Copy link
Collaborator Author

Keats commented Jan 25, 2018

Fixed in 0.3.0 that is currently building in travis/appveyor

@Keats Keats closed this as completed Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants