First of all I love Hugo, so I rebuild my blog on it.
But I encountered a problem when building my “About Me” page regarding template it uses.
Here’s my directory hierarchy:
index.html a.png b.png
baseof.html single.html list.html
I expected when rendering “about” page, Hugo will use
layout/about/single.html for templating, but actually it used
layout/_default/single, Can anyone tell me why? Many thanks!
BTW, my hugo version is:
Hugo Static Site Generator v0.74.0-DEV darwin/amd64 BuildDate: unknown.
about is not a defined taxonomy or category, it will not go to the
layout/about/ folder for the template.
Alternative is to use
layout: about in the front-matter of your about page.
For further clarification you can read the following documentation:
Thanks @Shashank !
I understand changing layout is a workaround way. What I confused is the type of the “about” page, per my understanding, it’s a single leaf bundle under the “about” section, is that right? If it’s right, according to the “hugo’s lookup order”, I think
layout/about/single.html is its template.
“about” is not a section.
Ah! I got it now, many thanks! @jmooring
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.