Static site generator
• 288 words • 1'26
The generator that builds this portfolio, written in Rust: Markdown, templates, syntax highlighting and a development server.
This portfolio uses neither Hugo nor Zola: it is generated by a tool I wrote myself in Rust. I write my pages in Markdown, and a single command turns them into a complete HTML website, ready to be deployed.

Features
- Markdown and TOML frontmatter: each page is a
.mdfile with its metadata (title, date, description, languages, draft…). - Templates with minijinja: a shared layout and variants for pages, projects and lists.
- Clean URLs:
projets/tetris.mdbecomes/projets/tetris/. - Automatic list pages: a new project shows up in the list, sorted by date, without changing anything else. Drafts are skipped.
- Multilingual: the English version lives in
content/en/and each page links to its translation. - Syntax highlighting of code blocks with syntect.
- Static files (CSS, images) copied into the generated site.
The development server
cargo run -- serve builds the site, serves it locally and rebuilds it on every
change:
- a watcher (notify) monitors the content, templates and static files;
- events from a single save are grouped together, so the site is rebuilt only once;
- the browser reloads automatically after each build;
- an error (a malformed frontmatter, for example) is shown in the terminal without stopping the server, and the previous version of the site stays online.
Technical choices
- Two-pass compilation: every page is first read and parsed, then rendered. This is what lets a list page know about all the others.
- In-memory rendering before writing: if a template fails, the output directory is left untouched.
- Web server with Axum and Tokio, with the build running on a separate thread so it never blocks the server.