nilsding/droetker
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
NAME
droetker -- static site generator
SYNOPSIS
droetker [-dfh] <command>
DESCRIPTION
droetker is a static website generator written in sh(1). It provides a
basic templating system through cpp(1).
OPTIONS
The following options are supported by droetker:
-d Display additional information.
-f Force stuff.
-h Display a small help text, which might not help you at all as it
refers you to the -help command. You are better off by using
that one.
COMMANDS
The following commands are supported by droetker:
help Display usage information and a list of commands.
new site_name
Create a new website scaffold in PWD/site_name.
build Build the site in OUTPUT_DIRECTORY. If OUTPUT_DIRECTORY is not
set, the site is built in PWD/_site.
If droetker can not find the configuration file PWD/_config.sh,
it does not attempt to build the site.
The output directory will not be deleted if it already exists.
serve Serves your site locally. This command requires Ruby to run.
FRONT MATTER
droetker allows per-page configuration using the front matter. The front
matter consists of key/value pairs, which look like this:
---
PAGE_LAYOUT=default.html
PAGE_PREPROCESSOR=redcarpet
---
Note the triple dashes at the begin and end of the key/value pairs.
These are required, otherwise droetker will not attempt to process the
file with cpp(1).
Every value is accessible anywhere in the page with $KEY.
There are some special keys that droetker makes use of. These are:
PAGE_LAYOUT
The to be used layout. The layouts are usually located in the
_layouts subdirectory.
PAGE_PREPROCESSOR
Preprocess the page using the given preprocessor. droetker will
run the preprocessor like this:
echo content | $PAGE_PREPROCESSOR
PAGE_PREPROCESSOR_ARGS
Run the preprocessor with the given arguments. It overrides
SITE_PREPROCESSOR_ARGS.
FILES
_config.sh The configuration file for a site. If this file is not in
PWD, droetker refuses to build the site.
BUGS
Yes.