blogin build
Render the content tree to static HTML, writing feeds, a sitemap, and the search index alongside the pages.
blogin build [--src <dir>] [--out <dir>] [--drafts] [--future] [--jobs <n>]
[--debug] [--no-debug] [--force] [--counters] [--verbose]
Options#
-s,--src <dir>- the content directory. It defaults to
content. Theblogin.jsonnext to it supplies the configuration, and everything else is found beside it. -o,--out <dir>- overrides the
output-dirfrom the config. -d,--drafts- includes posts marked
draft: true. -F,--future- includes posts dated ahead of today, which are excluded by default.
-j,--jobs <n>- render threads. It defaults to one per core.
-D,--debug- emits provenance comments around rendered partials and pages, so a page says which layout produced what.
-N,--no-debug- turns that off for a site whose config sets
"debug": true. -f,--force- rebuilds everything, ignoring what the last build recorded.
-c,--counters- prints the work the build did: posts parsed, templates compiled, pages rendered, files read and written, and directory walks.
-v,--verbose- names the directories it read and prints the work counters.
Example#
blogin build --out dist --force
Short options#
Every option has a one-letter spelling, and it means the same thing on every command:
-s --src |
-o --out |
-S --section |
-w --framework |
-j --jobs |
-p --port |
-d --drafts |
-F --future |
-f --force |
-D --debug |
-N --no-debug |
-c --counters |
-v --verbose |
So blogin build -o dist -f is blogin build --out dist --force.
They combine into one argument the usual way, so -fv is -f --force -v
written short, and blogin build -dFcv turns on drafts, future posts, counters,
and verbose output at once.
An option taking a value can end a run but cannot sit inside one, since the
value is the next argument and there is only one of those. -fo dist works and
-of dist is refused, naming the letter:
$ blogin build -of dist
blogin: '-o' wants a value, so it has to come last in '-of'
$ blogin build -fZv
blogin: unknown option '-Z' in '-fZv'
A value may itself begin with a dash. blogin build -o -weird writes to a
directory called -weird rather than reading the letters as options.
blogin with no command prints this table.
Errors#
Nothing is guessed. An unknown flag, a value flag with nothing after it, a
number that is not one, or a second positional argument stops the build with a
message naming what was wrong. A flag takes the next argument, so write
--out dist with a space rather than --out=dist.