What is the difference?
I want to eventually have a homepage, about page, product page, blog page (with posts). I’m guessing with the “hugo new post” I can start building an archive that can be rendered to a single page I set up for the blog?
So does each page require its own html doc? I understand index is for the homepage (called first), but what would I call the others and how would I link to them?
Keeping single pages at the root (eg, a single about page that lives at yoursite/about/) can seem tricky at first, but there are plenty of ways around this. First, here’s a way to think of your list vs single pages:
Your Blog (list) page template is going to live at layouts/sections/blog.html. This is where you format the list page that introduces the section (the section in this case is blog and all posts will live in the content/blog/ folder).
Your Post (single) page templates can live at /layouts/blog/single.html. Keep in mind that these are just examples of where they can live, but you have a lot of freedom w/r/t setting up default templates.
There are multiple ways to set up single pages at the root (ie, your About (single) and Product (single) pages) and bypass a list page for the singles section (ie, since it sounds like you want mysite.com/about and not mysite.com/singles/about/). The way I do it is to set up a section called singles (ie, a folder at content/singles) and then set the following in my config.toml to shorten the permalink for all singles single/individual content files (ie, each .md file):
singles = "/:title/"
So if I create a single content file at content/singles/about.md, the final url for the page is mysite.com/about/.
By default, this page can render according to the template you create at layouts/_default/single.html, but you have flexibility here as well. You can also declare the type and layout in the front matter of the page. For example:
Then create a template at layouts/singles/aboutpage.html and this will be the first page that Hugo looks for when rendering the About page that will live at yoursite.com/about/ (ie, a pretty url equivalent to yoursite.com/about/index.html).