Sections
Automatic section discovery and processing
sukr automatically discovers sections from your content directory structure.
What is a Section?
A section is any directory under content/ that contains an _index.md file:
content/
├── _index.md # Homepage (not a section)
├── about.md # Standalone page
├── blog/ # ← This is a section
│ ├── _index.md # Section index
│ └── my-post.md # Section content
└── projects/ # ← This is also a section
├── _index.md
└── project-a.md
Section Discovery
sukr automatically:
- Scans
content/for directories with_index.md - Collects all
.mdfiles in that directory (excluding_index.md) - Renders the section index template with the items
- Renders individual content pages (for blog-type sections)
Section Types
The section type determines which template is used. It's resolved in order:
- Frontmatter override:
section_type: blogin_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.