feat!: replace YAML frontmatter with TOML

Replace hand-rolled YAML parser (70 lines) with serde-backed
toml::from_str<Frontmatter> (6 lines). Frontmatter delimiter
changes from --- to +++ (Hugo TOML convention).

New Frontmatter fields:
- draft: bool (#[serde(default)]) for draft filtering
- aliases: Vec<String> (#[serde(default)]) for URL redirects

Date field upgraded from Option<String> to Option<NaiveDate>
with custom deserializer for TOML native dates. Parse, don't
validate: invalid dates now fail at deserialization time.

Add chrono dependency with serde feature. Update cascade in
sitemap.rs (NaiveDate→String at boundary), template_engine.rs
(FrontmatterContext gains draft/aliases), and all 14 tests.

BREAKING CHANGE: Content files must use +++ TOML frontmatter
instead of --- YAML frontmatter.
This commit is contained in:
Timothy DeHerrera
2026-02-14 06:50:35 -07:00
parent 021ffb6a78
commit 16fed12273
6 changed files with 91 additions and 107 deletions

View File

@@ -64,9 +64,10 @@ lightningcss = "1.0.0-alpha.70"
# tera: Jinja2-style templates, runtime-loaded (no recompilation needed).
# serde/toml: Configuration parsing. Standard choices, no lighter alternatives.
# ─────────────────────────────────────────────────────────────────────────────
serde = { version = "1", features = ["derive"] }
tera = "1"
toml = "0.8"
chrono = { version = "0.4", default-features = false, features = ["serde"] }
serde = { version = "1", features = ["derive"] }
tera = "1"
toml = "0.8"
# ─────────────────────────────────────────────────────────────────────────────
# Patches