Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A simple static site generator written in Clojure
Cryogen is a simple static site generator written in Clojure that compiles Markdown or AsciiDoc content into a static HTML website.
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.
project.clj and moving files to content/asc with a .asc extension.:description-include-elements setting.themes/{theme}/js/highlight.pack.js with a custom build from highlightjs.org to add more languages.:disqus? to true and provide a shortname in config.edn to add Disqus comments to posts.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-src and :sass-path configuration keys.base.html defines the site-wide chrome and each page layout extends it with a content block.:klipse configuration key enables live interactive code snippets in posts.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.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.lein run or clojure -M:build to compile content into the public folder, then copy it to any static host or web server.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.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.
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.
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.
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.
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/.
Cryogen is open source and distributed under the Eclipse Public License, the same license used by Clojure.
