feat: add TOML site config for metadata

- Cargo.toml: Add toml and serde dependencies
- site.toml: New config with title, author, base_url
- src/config.rs: SiteConfig struct with load() function
- src/error.rs: Add Error::Config for parse errors
- src/main.rs: Load site.toml, thread config and page paths
  through generators
- src/templates.rs: Use config.title in nav/titles,
  config.author in footer, config.base_url for canonical URLs.

All three config fields verified in generated HTML output.
This commit is contained in:
Timothy DeHerrera
2026-01-24 21:47:47 -07:00
parent 71d5ac1e37
commit d166e86435
7 changed files with 215 additions and 30 deletions

5
site.toml Normal file
View File

@@ -0,0 +1,5 @@
# Site configuration for nrd.sh static site compiler
author = "nrdxp"
base_url = "https://nrd.sh/"
title = "nrd.sh"