Static site/blog generator written in Clojure.
Statique turns Markdown files with YAML front matter into HTML using FreeMarker templates. It is designed for blogs and small static sites where content lives in a directory tree and generated output is written to out/.
- Ложное движение — my own blog (in Russian)
- See the
example/directory for a minimal site layout and configuration.
- Notes and standalone pages in Markdown with YAML front matter
- FreeMarker templates for notes, pages, standalone pages, feeds, deleted notes, and sitemap output
- RSS and Atom feed generation
- Incremental rendering with an items cache
- Markdown image rendering with
loading="lazy"and automaticwidth/heightattributes - Built-in image dimension reader for PNG, JPEG, GIF, WebP, and AVIF
- Retina image support with the
@2xfilename postfix - YouTube, Vimeo, and Coub embeds using noembed
- Draft notes via the
Draftfront matter field - Deleted notes via the
Deletedfront matter field anddeleted.ftltemplate sitemap.xmlgeneration- Static file and directory copying
- Tags
- Incremental static file copying
0.66
- AVIF image dimensions are now supported by the built-in size reader.
sitemap.xmlis regenerated only for sitemap-relevant changes and is not rewritten when rendered content is unchanged.
Run Statique in a directory containing blog.yaml:
lein runOr build and run the standalone jar:
lein uberjar
java -jar target/statique-0.66-standalone.jar-d,--debug- enable debug output-n,--no-cache- ignore the items cache and force regeneration-c,--config PATH- use a custom config file path, default:blog.yaml-h,--help- show help
Typical site layout:
blog.yaml
notes/
2026-04-27-example-note.md
singles/
about.md
theme/
note.ftl
page.ftl
single.ftl
deleted.ftl
atom.ftl
sitemap.ftl
static/
out/
cache/
Notes use YYYY-MM-DD-slug.md filenames. Files in notes/ that do not match that pattern are treated as drafts and are not rendered.
The default config file is blog.yaml. See example/blog.yaml for a complete sample.
Common general options:
notes-dir,singles-dir,theme-dir,output-dir,cache-dirnotes-per-pageanditems-per-feedfeeds, for exampleatomorrsssitemap-template, disabled by defaultcopy, a list of static files or directories to copy into the output directorycopy-last-as-index, useful for pageless blogsfirst-page-as-index, controls whether the first page is written asindex.html
Custom vars are passed to FreeMarker templates as vars; dashes in variable names are converted to underscores.
Build:
lein uberjarRun tests:
lein eftestStandard Leiningen tests also work:
lein testStart a REPL:
lein replCopyright (c) 2018-2026 Alexey Pegov
Distributed under the Eclipse Public License 2.0 or the GNU General Public License 2.0 or later, with Classpath exception, as declared in project.clj.