Overview
Blogin is a static blog generator written in C++. Point it at a directory of Markdown files and it produces a directory of plain HTML you can host anywhere. There is no database and no runtime. What ships is static HTML, CSS, and one search script, and the generator itself is a single binary with no dependencies.
The pipeline#
A build reads content/, parses each post's front matter and Markdown, renders
the body to HTML, wraps it in your HAML layouts, and writes the result under
public/. The same pass produces section listings, taxonomy pages, per-section
feeds, a sitemap, and a search index.
Markdown targets CommonMark, with GitHub Flavored Markdown for the extensions.
Speed#
A full build of a 300-page site with 167 MB of images takes well under a second on an M-series Mac, and most of that is copying the images. A rebuild after one edit takes milliseconds, because a rebuild only does the work the change requires: when nothing changed, nothing is parsed, rendered, or written, and when one post changed, one post is rendered.
An incremental result is byte-identical to a build from scratch, checked against randomised edit sequences rather than a few examples.
What you get#
- Sections from the content tree, with clean URLs, pagination, and explicit post ordering.
- Named taxonomies (tags, categories, and any you declare), each with term pages and an index, paginated the same way a section listing is. See Writing Posts.
- Atom, RSS, and JSON feeds, site-wide and per section, and a sitemap. See Feeds and Search.
- Markdown extensions: tables, task lists, footnotes, reference links, attribute lists, math, and Mermaid diagrams. See Writing Posts and Math and Diagrams.
- Per-post summaries and an optional table of contents. See Writing Posts.
- Open Graph and Twitter metadata, canonical links, and
robots.txt. See Metadata and SEO. - Data files, CSS-framework profiles, and server-side syntax highlighting.
- An asset pipeline that minifies, content-hashes, and writes responsive image variants.
- A preview server that rebuilds and live-reloads the open page on save. See Previewing and Building.
Templates#
Layouts are HAML with Blogin's own expression language: literals, names from the
view, member access, calls with arguments, comparison, boolean operators, string
concatenation, and #{} interpolation. There are no user-defined functions, no
assignment, and no way to call out into a host language. Anything outside the
language is an error naming the file, the line, the column, and the construct.
Template Expressions is the complete language, and HAML Compatibility lists every HAML construct with its status.