-
Notifications
You must be signed in to change notification settings - Fork 991
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
Problem with macro usage in themes #192
Comments
Try the next branch, I believe this is already fixed.
…On 4 Dec 2017 2:11 pm, "Peter Reijnders" ***@***.***> wrote:
I have encountered the following situation while using a theme with
macro's.
File: ./theme/something/template/index.html
{% import "macros.html" as macros %}<!-- html code goes here, the details of the macro is not important -->
File: ./theme/something/template/macro.html
<!-- macro code goes here, the details of the macro is not important -->
$ gutenberg build
Building site...
-> Creating 5 pages (1 orphan) and 1 sections
Failed to build the site
Error: Failed to render section ''
Reason: Failed to render 'something/templates/index.html'
Reason: Template 'macros.html' not found
When I create empty file directly in the templates folder:
$ touch templates/macros.html
$ gutenberg build
Building site...
-> Creating 5 pages (1 orphan) and 1 sections
Failed to build the site
Error: Failed to render section ''
Reason: Failed to render 'something/templates/index.html'
Reason: Template 'macros.html' not found
However, It seems to work when I duplicate the file directly into the
templates directories:
$ cp themes/something/templates/macros.html templates/macros.html
$ gutenberg build
Building site...
-> Creating 5 pages (1 orphan) and 1 sections
Done in 50ms.
This is a work around, but I would like to distribute the macros together
with the theme.
What am I doing wrong or what can I do to solve this problem?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#192>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApho5lPIuHGdS1jfYR_XIYAlM9IfvCOks5s8_2jgaJpZM4Q0teo>
.
|
Indeed, it is working fine in the next branch. My apologies: somehow I overlooked these two issues: [X] Keats/tera#235 I'll close this issue. Thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have encountered the following situation while using a theme with macro's.
File:
./theme/something/template/index.html
{% import "macros.html" as macros %} <!-- html code goes here, the details of the macro is not important -->
File:
./theme/something/template/macro.html
<!-- macro code goes here, the details of the macro is not important -->
When I create empty file directly in the templates folder:
However, It seems to work when I duplicate the file directly into the templates directories:
This is a work around, but I would like to distribute the macros together with the theme.
What am I doing wrong or what can I do to solve this problem?
The text was updated successfully, but these errors were encountered: