Cryogen

Static sites generated with Clojure

Cryogen provides some flexible configuration options. Your site's configuration file can be found at templates/config.edn and contains the following by default:

{:site-title           "My Awesome Blog"
 :author               "Bob Bobbert"
 :description          "This blog is awesome"
 :site-url             "http://blogawesome.com/"
 :post-root            "posts"
 :page-root            "pages"
 :post-root-uri        "posts-output"
 :page-root-uri        "pages-output"
 :tag-root-uri         "tags-output"
 :author-root-uri      "authors-output"
 :blog-prefix          "/blog"
 :rss-name             "feed.xml"
 :rss-filters          ["cryogen"]
 :recent-posts         3
 :post-date-format     "yyyy-MM-dd"
 :archive-group-format "yyyy MMMM"
 :sass-src             nil
 :sass-dest            nil
 :sass-path            "sass"
 :compass-path         "compass"
 :theme                "blue"
 :resources            ["img"]
 :keep-files           [".git"]
 :disqus?              false
 :disqus-shortname     ""
 :ignored-files        [#"\.#.*" #".*\.swp$"]
 :previews?            false
 :posts-per-page       5
 :blocks-per-preview   2
 :clean-urls?          true
 :hide-future-posts?   true
 :klipse               {}
 :debug?               false}

Your options

Key Description
site-title Your site's title
author Your name goes here!
description A blurb describing your site
site-url Your site's root url. This, along with all of the above values are used when generating your sitemap and RSS feed.
post-root The folder where the compiler will look for blog posts. Must be provided.
page-root The folder where the compiler will look for your custom pages. Must be provided.
post-root-uri The folder where the compiler will output compiled blog posts. This value is prepended to all post uri's. If this value is nil then the name of the output folder will be the same as the post-root folder. If the empty string ("") is provided then the posts will be outputted to the root folder of the blog (ie. resources/public/{blog-prefix}).
page-root-uri The folder where the compiler will output compiled pages. This value is prepended to all page uri's. If this value is nil then the name of the output folder will be the same as the page-root folder. If the empty string ("") is provided then the posts will be outputted to the root folder of the blog.
tag-root-uri The folder where the compiler will output compiled tag pages. This value is prepended to all tag page uri's. If no value is provided then the empty string will be used.
author-root-uri If this value is provided then the compiler will generate a page for each author containing a list of all their posts. More info here.
blog-prefix Prepended to all uri's. This must start with a slash.
rss-name The name of the rss file generated, nil defaults to rss.xml.
rss-filters Specific tags for which you want to create a separate RSS feed.
recent-posts The maximum number of recent posts to show in the sidebar.
archive-group-format Set the date format in which your archive page is organised. "yyyy" organises by year, "yyyy MMMM" organises by year and month; nil defaults to "yyyy MMMM".
post-date-format Set the date format that you want to use for the names of your .md files representing your posts; nil defaults to yyyy-MM-dd.
sass-src Directory containing sass(scss) files to be compiled; nil defaults to "css". Be sure to include this directory in your resources section.
sass-dest Directory where the compiled sass would be spit out; nil defaults to "css". Be sure to include this directory in your resources section.
sass-path Path at which the sass executable can be found. The default value "sass" works if you have the executable in your path, in that case nothing needs to be changed. If the executable is not in the search path or has a different name than please adapt this value.
compass-path Path at which the compass executable can be found. Just as with the sass-path fhe default value "compass" works if you have the executable in your path, in that case nothing needs to be changed. If the executable is not in the search path or has a different name than please adapt this value.
theme Set this to the theme you wish to deliver from the themes directory. You can add your own theme to this folder along with the current blue, blue_centered and nucleus themes. Must be provided.
resources A vector of directories/files to be copied over from templates to public upon compilation.
keep-files When wiping the public folder, keep the listed directories/files; eg. you would want to keep your .git folder if you plan on publishing to Github Pages from the public folder.
disqus? Set this to true if you want Disqus enabled on your site; nil defaults to false.
disqus-shortname Your Disqus shortname.
ignored-files Regexes matching files that you want to ignore during compilation. Ex: emacs interlock files.
previews? Set this to true if you would like to display a list of recent posts rather than a full, single post on your home page. Discussed here.
post-per-page If post previews are enabled then this is the maximum number of previews on a page.
blocks-per-preview The default number of (html) blocks to display per post preview. This can be overwritten by adding <!–more–> to your .md or .asc file to indicate where you'd like to break off your post.
clean-urls? Set this to true to emit html as subdirectories, e.g., prefix/root/page-name/index.html instead of prefix/root/page-name.html. Links would then end in /page-name/ instead of /page-name.html. Defaults to true.
hide-future-posts? Set this to true to include only current and past blogs in the compiled site. This allows for easy drafting of future articles.
klipse Set Klipse configuration for the whole site. See Klipse Integration for details.
debug? Enable debug outputs for compiler.

In addition to these default configuration options, you may add your own custom values. For example, if your blog has a subtitle that you'd like to display on your site:

  1. Add :subtitle "My subtitle" to the config file
  2. Inject the value into your templates via Selmer using {% subtitle %}