Cryogen

Static sites generated with Clojure

A basic Cryogen site usually looks something like this: (New files may be added in the future)

my-blog
├── content
│   ├── asc
│   │   ├── pages
│   │   │   └── adoc-page.adoc
│   │   └── posts
│   │       └── 2014-10-10-adoc-post.adoc
│   ├── md
│   │   ├── pages
│   │   │   ├── about.md
│   │   │   └── another-page.md
│   │   └── posts
│   │       ├── 2014-03-10-first-post.md
│   │       ├── 2014-11-04-second-post.md
│   │       └── 2014-12-11-docs.md
│   ├── img
│   └── config.edn
├── public
│   ⋮
├── src
│   └── cryogen
│       ├── core.clj
│       └── server.clj
├── themes
│   ├── blue
│   │   ├── css
│   │   │   └── screen.css
│   │   ├── html
│   │   │   ├── 404.html
│   │   │   ├── archives.html
│   │   │   ├── base.html
│   │   │   ├── home.html
│   │   │   ├── page.html
│   │   │   ├── post-content.html
│   │   │   ├── post.html
│   │   │   ├── previews.html
│   │   │   ├── tag.html
│   │   │   └── tags.html
│   │   └── js
│   │       └── highlight.pack.js
│   └── blue_centered
│       ⋮
└── project.clj
File/DirDescription
publicThis is where the generated site will go (by default) once Cryogen is done compiling your content. This can be configured in config.edn
contentThe main folder where all your Markdown/AsciiDoc content and other resources will go.
themesThis directory contains themes that you may apply to your site. You may use a theme by specifying its name under the theme key in config.edn.
content/config.ednConfiguration data for your site.
content/ascIf you are using AsciiDoc then keep your content here.
content/mdIf you are using Markdown then keep your content here.
pagesThe root folder for all your custom Markdown/Asciidoc pages. This folder name can be changed in config.edn.
postsThe root folder for all your post content in Markdown/Asciidoc. This folder name can also be changed.
content/imgThe default directory to place images.
themes/{theme}/cssPretty self explanatory. Put your theme's css files here
themes/{theme}/htmlThese are the templates that wrap posts and pages. Layouts are selected on a post-by-post basis and content gets injected by Selmer.
themes/{theme}/jsAlso self explanatory. The theme's JavaScript files go here.
src/cryogenContains the core and server.
project.cljYour typical project file for a Clojure project.

The html templates use Selmer which can extend other templates. Most html templates extend off of base.html. The following diagram gives an overview of the Cryogen Selmer hierachy.

Selmer Hierachy

Markdown/AsciiDoc content is injected into their specified layout files and then injected into the base html layout to create each page of your site.