Back to templates

Template details

Cryogen

A simple static site generator written in Clojure

About this template

Cryogen is a simple static site generator written in Clojure that compiles Markdown or AsciiDoc content into a static HTML website.

What is Cryogen?

Cryogen is a simple static site generator written in Clojure that compiles Markdown or AsciiDoc content into a static HTML website. It takes source files from the content/md directory (or content/asc for AsciiDoc) plus a site configuration in content/config.edn, and outputs a complete, deployable site to the public folder. The project is maintained by Carmen La and is licensed under the Eclipse Public License, the same license as Clojure.

Key Features

  • Markdown and AsciiDoc support — Blog posts and pages are authored in Markdown by default; switching to AsciiDoc means changing one dependency in project.clj and moving files to content/asc with a .asc extension.
  • Tagging and table of contents — Posts can be tagged, and the compiler can auto-generate a table of contents for each page based on the :description-include-elements setting.
  • Code syntax highlighting — Highlight.js powers code blocks; replace themes/{theme}/js/highlight.pack.js with a custom build from highlightjs.org to add more languages.
  • Disqus support — Set :disqus? to true and provide a shortname in config.edn to add Disqus comments to posts.
  • Sitemap and RSS generation — sitemap.xml and an RSS feed named feed.xml by default are generated automatically; :rss-filters controls which posts are included in the feed.
  • Sass/SCSS compilation — Stylesheets can be written in Sass or SCSS; the build compiles them according to the :sass-src and :sass-path configuration keys.
  • Selmer templating — Layouts use the Selmer templating engine; a base.html defines the site-wide chrome and each page layout extends it with a content block.
  • Klipse integration — The :klipse configuration key enables live interactive code snippets in posts.

Who is it for?

  • Clojure developers who want a static site generator they can configure in EDN and extend with Clojure libraries.
  • Bloggers who prefer Markdown or AsciiDoc and want a no-database site that compiles to plain HTML with tags, RSS, sitemap, and Disqus comments.
  • Developers who want fast static output — the generated site in public/ can be served by Nginx or Apache with no server-side runtime, and the serve:fast variants do partial compilation of only changed pages.

What can you do with Cryogen?

  • Create a new blog in seconds — Run lein new cryogen my-blog (with Leiningen 2.5.0+) or use clj-new/deps-new to scaffold a project with config, content, and theme folders.
  • Generate and deploy a static site — Run lein run or clojure -M:build to compile content into the public folder, then copy it to any static host or web server.
  • Publish a personal blog — The README lists many blogs built with Cryogen, including the author's site at carmen.la and the Cryogen documentation site at cryogenweb.org.
  • Run a local dev server with live reload — lein serve or clojure -X:serve watches the content and themes folders and recompiles automatically; the :fast variants compile only the changed page or post.

How does Cryogen work?

Creating a site starts with a template command such as lein new cryogen my-blog. Content lives in the content folder with a config.edn file holding site-wide settings. Running the built-in server compiles Markdown and templates into static HTML; running lein run or clojure -M:build produces the site without a server. The finished site is output to the public folder for deployment.

Alternatives

  • Hugo — a static site generator written in Go.
  • Jekyll — a static site generator written in Ruby that integrates tightly with GitHub Pages.

FAQ

How do I create a new site with Cryogen?

Use Leiningen 2.5.0 or newer and run lein new cryogen my-blog. You can also use the clj-new or deps-new tools from the Clojure CLI, as documented in the README with specific commands.

Does Cryogen support Markdown and AsciiDoc?

Yes. Markdown is the default format; to use AsciiDoc, change the Markdown dependency in project.clj to the AsciiDoc one and place .asc files in content/asc instead of .md files in content/md.

How do I change the theme?

Change the :theme key in content/config.edn. The template ships with three themes in the themes folder. Note that the Nucleus theme from downloadwebsitetemplates.co.uk requires keeping the footer unless you make a donation.

How do I deploy my site?

Copy the generated static content from the public folder to any static web server, such as Nginx or Apache. The README includes a sample Nginx configuration that serves the site from /var/blog/.

Is Cryogen free?

Cryogen is open source and distributed under the Eclipse Public License, the same license used by Clojure.

screenshot of Cryogen on template0.com