docs: migrate content files to TOML frontmatter

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.
This commit is contained in:
Timothy DeHerrera
2026-02-14 06:57:55 -07:00
parent 16fed12273
commit 46c00c7729
18 changed files with 154 additions and 149 deletions

View File

@@ -1,8 +1,8 @@
---
title: Features
description: Explore sukr's capabilities
section_type: features
weight: 3
---
+++
title = "Features"
description = "Explore sukr's capabilities"
section_type = "features"
weight = 3
+++
sukr provides a focused set of features for building fast, minimal static sites.

View File

@@ -1,8 +1,8 @@
---
title: CSS Minification
description: Automatic CSS optimization at build time
weight: 7
---
+++
title = "CSS Minification"
description = "Automatic CSS optimization at build time"
weight = 7
+++
sukr automatically minifies CSS files in your static directory during the build.

View File

@@ -1,8 +1,8 @@
---
title: Atom Feeds
description: Build-time feed generation for blog posts
weight: 6
---
+++
title = "Atom Feeds"
description = "Build-time feed generation for blog posts"
weight = 6
+++
sukr generates an Atom 1.0 feed for blog posts at build time.
@@ -29,7 +29,7 @@ The feed includes:
## Auto-generation
Feed generation happens automatically when any content exists in a section with `section_type: blog`. No configuration required.
Feed generation happens automatically when any content exists in a section with `section_type = "blog"`. No configuration required.
Posts are sorted by date (newest first), matching the blog section ordering.
@@ -50,11 +50,11 @@ Add a link in your `base.html` template:
Post dates in frontmatter should use `YYYY-MM-DD` format:
```yaml
---
title: My Post
date: 2024-01-15
---
```toml
+++
title = "My Post"
date = 2024-01-15
+++
```
The feed converts this to RFC 3339 format required by Atom.

View File

@@ -1,8 +1,8 @@
---
title: Math Rendering
description: Build-time LaTeX math with KaTeX
weight: 5
---
+++
title = "Math Rendering"
description = "Build-time LaTeX math with KaTeX"
weight = 5
+++
sukr renders LaTeX math expressions at build time using KaTeX, producing static HTML and CSS. No client-side JavaScript required.

View File

@@ -1,8 +1,8 @@
---
title: Mermaid Diagrams
description: Build-time diagram rendering with Mermaid
weight: 4
---
+++
title = "Mermaid Diagrams"
description = "Build-time diagram rendering with Mermaid"
weight = 4
+++
sukr renders Mermaid diagrams at build time, producing inline SVG. No client-side JavaScript required.

View File

@@ -1,8 +1,8 @@
---
title: Sections
description: Section types, frontmatter, and template dispatch reference
weight: 2
---
+++
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](../content-organization.html).
@@ -10,7 +10,7 @@ sukr discovers sections from your content directory structure. For an explanatio
The section type determines which template is used. It resolves in order:
1. **Frontmatter override**: `section_type: blog` in `_index.md`
1. **Frontmatter override**: `section_type = "blog"` in `_index.md`
2. **Directory name**: `content/blog/` → type `blog`
### Built-in Section Types
@@ -25,13 +25,13 @@ The section type determines which template is used. It resolves in order:
In `_index.md`:
```yaml
---
title: My Blog
description: Thoughts and tutorials
section_type: blog # Optional, defaults to directory name
weight: 1 # Nav order
---
```toml
+++
title = "My Blog"
description = "Thoughts and tutorials"
section_type = "blog" # Optional, defaults to directory name
weight = 1 # Nav order
+++
```
## Adding a New Section

View File

@@ -1,8 +1,8 @@
---
title: Sitemap
description: Automatic XML sitemap generation for SEO
weight: 7
---
+++
title = "Sitemap"
description = "Automatic XML sitemap generation for SEO"
weight = 7
+++
sukr generates an XML sitemap at build time for search engine optimization.
@@ -38,11 +38,11 @@ URLs use the `base_url` from `site.toml` to construct absolute URLs as required
If content has a `date` field in frontmatter, it's included as `<lastmod>`:
```yaml
---
title: My Post
date: 2024-01-15
---
```toml
+++
title = "My Post"
date = 2024-01-15
+++
```
Content without dates omits the `<lastmod>` element.

View File

@@ -1,8 +1,8 @@
---
title: Syntax Highlighting
description: Build-time code highlighting with Tree-sitter and tree-house
weight: 3
---
+++
title = "Syntax Highlighting"
description = "Build-time code highlighting with Tree-sitter and tree-house"
weight = 3
+++
sukr highlights code blocks at build time using [tree-house](https://github.com/helix-editor/tree-house) (Helix editor's Tree-sitter integration). No client-side JavaScript required.

View File

@@ -1,8 +1,8 @@
---
title: Tera Templates
description: Customizable templates without recompilation
weight: 1
---
+++
title = "Tera Templates"
description = "Customizable templates without recompilation"
weight = 1
+++
sukr uses [Tera](https://keats.github.io/tera/), a Jinja2-like templating engine. Templates are loaded at runtime, so you can modify them without recompiling sukr. See the [Tera documentation](https://keats.github.io/tera/docs/) for template authoring syntax (filters, blocks, inheritance).
@@ -95,11 +95,11 @@ Each anchor in `anchors` has:
Set `template` in frontmatter to use a custom template:
```yaml
---
title: Special Page
template: special
---
```toml
+++
title = "Special Page"
template = "special"
+++
```
This uses `templates/content/special.html` instead of the default.