fer yer blag
blagger is the world's dumbest static site generator, rivaled only by that pipeline of Bash and Python scripts everyone thinks about making once.
USAGE:
blagger [FLAGS] [OPTIONS] --out-dir <out-dir>
FLAGS:
-h, --help Prints help information
-a Include hidden files
-V, --version Prints version information
OPTIONS:
-I, --ignored-files <ignored-files>... List of files to ignore [default: ]
-i, --in-dir <in-dir> Input directory [default: .]
-o, --out-dir <out-dir> Output directory
--tag-html <tag-html> Template for tag pages. If not given, tag pages are not generated
--tag-hub <tag-hub> Template for the special "all tags" tag page. If not given, defaults to
tag_html
--tag-pages-dir <tag-pages-dir> Directory relative to `${out-dir}` that tag pages will be rendered to
[default: tags]
-t, --template-html <template-html> Path to template file for Markdown posts
Everything in in-dir except Markdown files (files with an extension of md or markdown) and files with a path Rust considers equal to template-html is copied as-is into out-dir. This is your CSS, JavaScript, images, hand-written HTML (you psycho), whatever. The directory structure is preserved - in/css/what/why.css becomes out/css/what/why.css.
Markdown files are processed as follows:
- The post is pre-processed and rendered.
- The file is spit at the first occurrence of
::===::\n(that is,::===::and a newline.)- The first string split off is the "front matter". This is TOML with the following schema:
title: Required. A string.tags: Required. A (possibly empty) list of strings.subtitle: Optional string.date: Optional TOML date-time.
- The second string split off is the Markdown content of the post.
- The first string split off is the "front matter". This is TOML with the following schema:
- The template file given by
template-htmlis rendered. The front matter is provided to the template as an object calledfront, and the markdown content of the post asmd_content.- In the template, a formatter named
markdownis available for rendering Markdown strings.
- In the template, a formatter named
- The file is spit at the first occurrence of
- The rendered file is written to
out-dirusing the same directory-preserving scheme as other files, with the extension changed tohtmlso browsers know what the heck is going on.
The template file is never emitted to out-dir.
- Tag navigation pages
- RSS feed generation
- Multiple templates available
- Sitemap?