If you like Clojure, you’ll love…

Cryogen

Static Website Generation Made Easy

Dmitri Sotnikov
3 min readAug 3, 2021

--

Cryogen is a Clojure-based static site generator by Carmen La. Since there are already many popular site generators such as Jekyll, let’s take a look at what makes Cryogen interesting.

In my opinion, the main selling feature of this project is its simplicity.

Installing Cryogen

Cryogen is shipped as a Leiningen and Clojure CLI templates. All you have to do to create a site is run:

# Leiningen
lein new cryogen my-blog
# Clojure CLI
clojure -X:new :template cryogen :name me.my-blog

This will create an instance of the project with a template site initialized. The site can be run in dev mode using:

# Leiningen
lein serve
# Clojure CLI
clojure -X:serve

Cryogen Features

Once started, a helpful readme is shown on what to do next, which is a really nice touch.

The server will watch for changes in the content folder and recompile the site whenever updates are detected. The compiled site is served from public. The static assets generated there can now be copied over to be served by Nginx or Apache in production.

The layout is handled using Selmer templates. You can write the content of your posts and pages using Markdown or AsciiDoc.

The generator handles all the common things right out of the box, like:

  • Linking up pages
  • Creating tags
  • Syntax highlighting
  • Sitemap
  • RSS

I definitely recommend taking a look at this project if you’re a Clojure developer looking to make a static site in the future.

Originally published at https://yogthos.net.

If you enjoyed this article, be sure to check out Dmitri Sotnikov’s book from The Pragmatic Bookshelf:

Through the end of October 2021, you can save 35% on the ebook using promo code dswdcloj3_medium_35. Note that promo codes are not valid on prior purchases.

--

--