Jfever is (yet another) simple live static web site generator
Original idea and implementation from PuerkitoBio.
go get git.inexacte.science/juju/jfever
You’ll need the following directories (their name can be changed via command line options):
out/: Generated content
src/: Source files for web pages, directory tree produce site navigation path
template/: Your amber templates
static/: Your static contents
Any change in the last 3 directories (or their sub-directories) will trigger the rebuild process and regenerate all contents. Direcotry creation, file creation and deletion will be reflected in out/ directory.
Jfever only cares about
*.md files in the src directory, and about
*.amber (Amber templates) in templates directory,
any other files will be copied as is to out/ directory. Hidden files starting with
. are ignored.
The following options can be set at the command-line:
-p, --port= the port to use for the web server (default: 9000) -g, --generate-only generate the static site and exit -G, --no-generation when set, the site is not automatically generated -n, --site-name= the name of the site (default: Site Name) -t, --tag-line= the site's tag line -r, --recent-posts= the number of recent posts to send to the templates (default: 5) -b, --base-url= the base URL of the web site (default: http://localhost) -d, --debug Enable debug output -s, --src= the source sub-dir name (default: src) -o, --out= the output sub-dir name (default: out) -a, --template= the template sub-dir name (default: templates) -i, --static= static content to be copied to Out/ (default: static)
Jfever uses YAML front matter to get metadata for a post. This is a complicated way to say that you have to add blocks of text like this at the start of your posts:
--- Title: My title Description: My short-ish description of the post. Author: Me Date: 2013-07-14 Lang: en --- # Here is my post! Etc.
The three dashes delimit the front matter. It must be there, beginning and end. Between the dashes, the part before the colon
: is the key, and after is the value. Simple as that.
Date are mandatory.
Valid date formats are
2006-01-02 15h (or
2006-01-02 15:04 (or
2006-01-02 8:17) or the RCF3339 format (
Template can be used to choose the template (without the .amber extension) to use, default to
Index will save also the page as
index.html, its value will be ignored.
Slug will rename the page with its value, default to all characters in filename within regex
You can define any
xxx key in the front matter and use that key/value in your template.
There a simple demonstration site under the
The BSD 3-Clause License.