Customised, Stasis-based Static Site Generator
About ↟
This is really just a set of functions used for generating a couple of static sites on different projects. The goals of this set of functions are loosely aligned with a nascent LFE project with a cool logo, so I borrowed the name and images for a "Clojure version" :-)
Prerequisites ↟
- Clone the repo :-)
cd dragon
export PATH=$PATH:$(pwd)/bin
source dev-resources/shell/dragon-bash-autocompletion
Configuration ↟
Every project that uses Dragon to generate static content needs to add some
configuration to its project.clj
file. Here's an example taken from
the Clojang Blog e.g.:
:dragon {
:domain "clojang.lfe.io"
:name "The Clojang Blog"
:description "News, Information, & Tutorials for the Clojang Library Collection"
:dev-port 5097
:output-dir "docs"
:posts-path "/archives"
:feed-count 20
:cli {
:log-level :info
:log-ns [clojang.blog dragon]}}
Documentation ↟
The latest docs are available here:
CLI ↟
The project comes with a CLI. The supported commands (and any subcommands) are
documented here, but to give you a sense of things, here's the output of
dragon help
:
$ dragon help
Usage:
dragon COMMAND [help | arg...]
dragon [-h | --help | -v | --version]
Commands:
new Create files of a given type; see 'dragon new help'
show Display various blog data in the terminal
gen Generate updated static content for a site
run Run the dragon site locally as a Ring app
help Display this usage message
version Display the current dragon version
More information:
Each command takes an optional 'help' subcommand that will provide
usage information about the particular command in question, e.g.:
$ dragon new help
License ↟
Copyright © 2017, Clojure-Aided Enrichment Center
Apache License, Version 2.0.