Crates.io | blagger |
lib.rs | blagger |
version | 0.3.0 |
source | src |
created_at | 2020-05-17 20:08:03.257592 |
updated_at | 2020-12-17 04:33:11.033253 |
description | the stupid static site generator fer yer blag |
homepage | |
repository | https://gitlab.com/c-x-berger/blagger |
max_upload_size | |
id | 242771 |
size | 40,413 |
blagger
fer yer blag
blagger
is a simple static site generator, not as powerful as Jekyll but more robust than a hand-rolled pipeline of scripts.
USAGE:
blagger [FLAGS] [OPTIONS] --out-dir <out-dir>
FLAGS:
-h, --help Prints help information
-a Include hidden files
-V, --version Prints version information
OPTIONS:
-b, --base-url <base-url> Base URL of the site once deployed
-f, --feed <feed> RSS feed file location. When specified, an RSS feed of posts (markdown
files) is written to the given file
--hub-template <hub-template> Template for the special "all tags" tag page. If not given, defaults to
tag_html
-I, --ignored-files <ignored-files>... List of files to ignore [default: ]
-i, --in-dir <in-dir> Input directory [default: .]
-l, --language <language> Language tag. Note that not much validation is performed beyond attempting
to convert a Linux-style locale into an HTML language code [env: LANG=]
-o, --out-dir <out-dir> Output directory
--pages-dir <pages-dir> Directory relative to `${out-dir}` that tag pages will be rendered to
[default: tags]
--tag-html <template> Template for tag pages. If not given, tag pages are not generated
-t, --template-html <template-html> Path to template file for Markdown posts
-T, --title <title> Title for the RSS feed
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:
::===::\n
(that is, ::===::
and a newline.)
title
: Required. A string.tags
: Required. A (possibly empty) list of strings.subtitle
: Optional string.date
: Optional TOML date-time.template-html
is rendered. The front matter is provided to the template as an object called front
, and the markdown content of the post as md_content
.
markdown
is available for rendering Markdown strings.out-dir
using the same directory-preserving scheme as other files, with the extension changed to html
so browsers know what the heck is going on.The template file is never emitted to out-dir
.