Best practices for pages?

I’m new to Hugo and I haven’t been able to find a recommended way to put together a site that is primarily pages not posts.

The site map I want is:

.
├── about
├── experience
 |       └── community
 |       └── board
 |       └── career
├── vision
├── vote
├── news

My questions are:

  • What is the best way to set up this directory structure in the content folder?
  • How can I create different templates for the pages?
  • How should I group assets with content? (Page bundles seem cool but I don’t know how to use them if the page is at content/about.md)

I’ve seen lots of different ways to do bits of this but I’m wondering if someone has found a good way to tie it all together that they’re happy with.

Thanks!

not sure if mine is best practice but

usually I prefer to create a folder for pages section. In your case the structure could be like this

─── pages
       └── about
       └── experience
       │            └── community
       │            └── board
       │            └── career
       ├── vision
       ├── vote
       ├── news

My workaround is to always using Content Types

for example

title = About
type = "pages"
layout = "about" #define layout for this page

the template will be in layouts / pages / about.html

If you follow the content structure like mine then the best way to manage content assets is to use the page bundles :slightly_smiling_face:

1 Like

This is very straight forward! Thank you I will give it a try :slight_smile:

I set up my first directory like this and it’s working great. Thanks!