Hi! Newbie of Hugo here. I’ve come up with some questions, hope someone could help me. Here is my repo, please use it if you wanna reproduce the issue.
First downloaded Hugo (v0.18.1), applyed hugo_theme_robust, and added a post as the tutorial did.
Then I wanted to try if the Block Template worked or not, so I did these:
- Duplicated
/themes/hugo_theme_robust/_default/baseof.html
, added something different from the original file (In my repo was<p>Hello baseof.html!!!</p>
), renamed topost-baseof.html
, and move to/themes/hugo_theme_robust/layouts/section/
- Duplicated
/themes/hugo_theme_robust/_default/list.html
, added something different from the original file (In my repo was<p>Hello post.html!!!</p>
), renamed topost.html
, and move to/themes/hugo_theme_robust/layouts/section/
Now I wanna know if the Block Template Lookup Order worked or not. If it worked, when I visit http://base_url/post
, the page should showed “Hello baseof.html!!!” and “Hello post.html!!!”.
The docs page described the order. After some experiments, and it’s the result (Checked means worked, unchecked means not):
- [ ]
/layouts/section/post-baseof.html
(Movedpost-baseof.html
to this path) - [ ]
/themes/exampletheme/layouts/section/post-baseof.html
(Movedpost-baseof.html
to this path) - [ ]
/layouts/section/baseof.html
(Renamepost-baseof.html
tobaseof.html
) - [ ]
/themes/exampletheme/layouts/section/baseof.html
(Renamepost-baseof.html
tobaseof.html
) - [x]
/layouts/_default/post-baseof.html
(Movedpost-baseof.html
to this path) - [x]
/themes/exampletheme/layouts/_default/post-baseof.html
(Movedpost-baseof.html
to this path)
(Didn’t try the last two because it will override the original baseof.html
)
So, is it a bug, or I just misunderstood something?