Archetypes
Alpha offers frontmatter archetypes specified for each layout, (page
, story
, utility
, home
, list
, taxonomy
, terms
) and a default
with only global keys.
To create a page using a specific archetype, use the command:
hugo new content --kind [archetype] [path]/filename.md
Note: Don’t start the [path]
with /
.
Creating Sections and Pages.
Each archetype corresponds to a layout: page
, story
, utility
, home
, list
, taxonomy
, terms
.
Lets consider a site that has the following content/
structure.
content/
├── articles/
│ └── _index.md
└── _index.md
We want to create a new section called stories:
hugo new content --kind list stories/_index.md
content/
├── articles/
│ └── _index.md
├── stories/
│ └── _index.md
└── _index.md
And then we create a page bundle titled “Example Story”:
hugo new content --kind story stories/example-story/index.md
The final structure will be:
content/
├── articles/
│ └── _index.md
├── stories/
│ ├── example-story/
│ │ └── index.md
│ └── _index.md
└── _index.md