I am using a theme intended for blogs, but I would also like to host some informational pages too. Unlike blog posts, I would like the informational pages to have a header, sidebar and footer. I think this has to do with templates and partials, but I don’t know:
How to specify that a page should use a particular template—i.e. how does Hugo determine whether a markdown file is a blog post or an informational page?
What belongs in a template, and what belongs in a partial? I assume the actual header, sidebar and footer will be partials, but how does the template pull those together into an actual page?
How can I pass information from the page’s front matter to a partial/template? In other words, say I want a partial that links to “previous_page”, with previous_page defined in the front matter alongside title.
Thank you for these links. I think they’re what I need, but I’m having some trouble getting off the ground. My info pages are in content/info and I’ve created archetypes/info.md too. It looks like this:
But still it doesn’t display three copies of the info-nav.html partial. It still looks like a default template. Where have I gone wrong, and is there a way to determine the template actually used to render the page?
It seems like you have a fundamental misunderstanding of the interaction between content, archetypes, and templates. I suggest starting with a tutorial. This video series is a little bit outdated, but still excellent in its approach and content: