marie-ssg: Static Site Generator
Context
marie-ssg is a static site generator built to do one thing well: turn markdown files paired with TOML metadata into HTML pages. It powers this site. The design prioritizes build speed, minimal configuration, and staying out of the way.
How It Works
Each content file is a pair: article.md for the body and article.meta.toml for metadata (title, date, tags, cover image). Templates use Jinja-style syntax via Minijinja. Content loading runs in parallel using Rayon, and syntax highlighting covers 10 languages through the Autumnus library.
The build pipeline is a single pass: load content, render templates, copy static assets, generate sitemap and RSS feed. Watch mode on macOS uses FSEvents for automatic rebuilds during development.
Features
- Flexible URL patterns:
{date}/{stem},{year}/{month}/{stem}, or just{stem} - Content-based asset hashing: Cache busting via BLAKE3 hashes appended to CSS/JS filenames
- Draft support: Mark content as
draft = trueto exclude from production builds - Clean URLs:
/articles/my-post/instead of/articles/my-post.html - Syntax highlighting: 10 languages with configurable themes
- RSS and sitemap: Generated automatically from content metadata
- Redirects: Declarative URL redirects for content migrations
- Flamechart profiling: Built-in performance profiling for build pipeline optimization
Performance
The binary is size-optimized: LTO, symbol stripping, and a migration from chrono to the time crate reduced the release build from 80 MB to 9 MB. Build times for a typical site are under 200 ms.
Links
- Source: github.com/l1x/marie-ssg
- License: MIT / Apache-2.0