Hi,
At the moment I only have one section (/blog/
) on my site. In this blog, I have a list page (/blog/list.html
) and article pages (/blog/single.html
).
I’d like to divide my blog into several sections, at the root of the site, by thematics. Each section would have a list page and single articles.
My question is about templates. How can I have 2 different types of single page, 1 for the pages at the root of the site (contact, about, etc.) and one for the blog posts in different sections?
I could take my current single-section template and create headings for each section, with the same single layout for each(/hugo/single.html
, /web/single.html
, /seo/single.html
,…). But that’s not very Don’t repeat yourself.
I could also add that the default single is for blog posts (single.html
). And add layout: root-single
to all the pages at the root. Same problem…
So, is it possible (?), using the template system alone, without repetition or manual action (_cascade
or layout:
), to have:
- a single template for all the pages at the root (
single.html
) - a single template for all the other pages without exception (the principle of
/**/single.html
)
Thank you in advance for your ideas.
I hope I haven’t asked a stupid question for which I haven’t seen the answer in the documentation.