Migrate all 17 docs/content/ files from --- YAML to +++ TOML frontmatter delimiters and key = value syntax. Update 8 embedded frontmatter examples in 7 documentation pages to match (configuration, content-organization, getting-started, security, sections, sitemap, feeds, templates). Update configuration.md frontmatter reference table: add draft and aliases fields, correct date type from string to date.
1.4 KiB
1.4 KiB
+++ title = "Sections" description = "Section types, frontmatter, and template dispatch reference" weight = 2 +++
sukr discovers sections from your content directory structure. For an explanation of how sections work and how directories map to site structure, see Content Organization.
Section Types
The section type determines which template is used. It resolves in order:
- Frontmatter override:
section_type = "blog"in_index.md - Directory name:
content/blog/→ typeblog
Built-in Section Types
| Type | Behavior |
|---|---|
blog |
Sorts by date (newest first), renders individual posts |
projects |
Sorts by weight, card-style listing |
| (other) | Sorts by weight, uses default template |
Section Frontmatter
In _index.md:
+++
title = "My Blog"
description = "Thoughts and tutorials"
section_type = "blog" # Optional, defaults to directory name
weight = 1 # Nav order
+++
Adding a New Section
- Create directory:
content/recipes/ - Create index:
content/recipes/_index.md - Add content:
content/recipes/pasta.md - Optionally create template:
templates/section/recipes.html
That's it. sukr handles the rest.