Use tree-sitter-toml-ng v0.7.0 from tree-sitter-grammars, which is
compatible with tree-sitter 0.26 (unlike the older tree-sitter-toml).
- Add tree-sitter-toml-ng dependency
- Add Toml variant to Language enum
- Add TOML_CONFIG with crate's HIGHLIGHTS_QUERY
Fully migrate from compile-time maud templates to runtime Tera:
- Rewrote main.rs to use TemplateEngine and discover_sections()
- Replaced hardcoded blog/projects with generic section loop
- Added Clone derive to Frontmatter and Content
- Fixed section_type dispatch via Section struct
- Deleted src/templates.rs, removed maud dependency
Users can now add sections without code changes.
Lay groundwork for user-editable templates by adding Tera as a
runtime template engine alongside the existing maud templates.
Changes:
- Add tera dependency
- Create TemplateEngine struct with render methods
- Add TemplateLoad/TemplateRender error variants
- Add section_type/template fields to Frontmatter
- Create templates/ directory with base, page, section, and content templates
Dead code warnings are expected; TemplateEngine will be wired
in to replace maud in subsequent commits.
Add NavItem struct and discover_nav() function to scan content
directory and automatically build navigation from:
- Top-level .md files (pages)
- Directories with _index.md (sections)
Navigation is sorted by frontmatter weight, then alphabetically.
Custom nav_label field allows overriding title in nav menu.
Includes 5 unit tests covering page/section discovery, weight
ordering, and nav_label support.
Switch mermaid-rs-renderer from git dependency to crates.io 0.1.
Vendor and patch dagre_rust 0.0.5 to fix upstream panic in
remove_edge_label_proxies() where unwrap() is called on None
when processing edge label proxies without edge references.
This enables sequence diagrams and state diagrams that previously
crashed the build.
Add src/mermaid.rs with render_diagram() wrapper around
mermaid-rs-renderer for build-time Mermaid-to-SVG conversion.
- Use mermaid-rs-renderer git dependency (SVG-only, no PNG)
- Configure with RenderOptions::modern() theme
- Include unit tests for flowchart and sequence diagrams
Add src/math.rs with render_math() wrapper around katex-rs for
build-time LaTeX to HTML conversion. Wire module into main.rs.
- Use KatexContext::default() for standard LaTeX function registry
- Settings: display_mode toggle, throw_on_error=false for graceful
degradation
- Include unit tests for inline/display math rendering
Adapted Helix nix/injections.scm for tree-sitter-highlight:
- Removed Helix-specific predicates
- Recognizes bash in buildPhase/installPhase, python in testScript,
json in fromJSON, etc.
- Cargo.toml: Add tree-sitter grammars for Nix, Python, JavaScript,
TypeScript, Go, C, CSS, HTML, YAML. Upgrade tree-sitter-highlight
to 0.26 for language version 15 compatibility.
- src/highlight.rs: Add Language enum variants and get_config()
match arms for all new languages. Update render() callback for
0.26 API (writes attributes to buffer). Add tests for Nix and
Python highlighting.
TOML excluded due to incompatible API (tree-sitter 0.20 vs 0.26).
- 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.
- Cargo.toml: Add tree-sitter-highlight + grammar crates
(rust, bash, json). TOML dropped due to API incompatibility.
- src/highlight.rs: Language enum, highlight_code() function,
4 unit tests covering parsing and HTML generation.
- Uses static HTML_ATTRS array for zero-allocation rendering.
Add minimal e2e pipeline to transform content → HTML:
- src/error.rs: Custom error types with thiserror
- src/content.rs: YAML frontmatter parsing via gray_matter
- src/render.rs: Markdown → HTML via pulldown-cmark
- src/templates.rs: Maud templates for base layout and posts
- src/main.rs: Pipeline orchestrator
All 15 blog posts successfully rendered to public/blog/*/index.html.
Added thiserror and walkdir dependencies.
Added public/ and DepMap fragment to .gitignore and AGENTS.md.