I have tried creating the following templates to no avail
layouts/aaa/index.html
layouts/aaa/single.html
layouts/aaa.html
I have tried creating the following templates to no avail
layouts/aaa/index.html
layouts/aaa/single.html
layouts/aaa.html
According to the Hugo Lookup Order:
Btw, do you specify the layout
in front matter?
This is a leaf bundle, not a section, so without layout
or type
in front matter the lookup order is:
If you set type
in front matter to about
, the lookup order becomes:
Thank you for your reply! I already know that index.md is just a regular page, and the template it uses is single.html or single.html.html
Now I find that after there is an index.md file in the aaa/ directory, if I add other articles such as: bbb.md, it will not be able to open. Is it true that as long as there is index.md, other articles cannot be added?
Yes. I just answered this question, again, in another thread:
Use an _index.md file to tell Hugo, “This directory is a section (branch bundle) that (probably) has member pages or subsections.” Use an index.md file to tell Hugo, “This is a just a page (leaf bundle), and it has no descendants.”