Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBase Template with block definitions in partial's does not work #4121
Comments
This comment has been minimized.
This comment has been minimized.
Block definitions in partials aren't supported. If you want to discuss alternatives, ask at https://discourse.gohugo.io/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
project structure
_default/baseof.html
partials/content.html
themes/abc/layouts/info/baseof.html
If that file only contains lines as above, the info/baseof.html do not replace the block at the default/baseof.html.
{{ define "content-view" }}abcd{{ end }}
That is very ugly and breaks for me a lot of power. Why I can not "subtheming" the base-template for different sections with block syntax?
(maybe the problem contains on the effect of question 2?)
If themes/abc/layouts/info/baseof.html is delete then the block definitions in the partial "content.html" do not work correctly. Hugo does not match the present "info/....html" files for the info content of the project. The output for e.g. "content-view" is the default output
<h1>info-baseof</h1>
If I put the lines of the partial into the _default/baseof.html then the info content use the "info/....html" layouts.