commits
Replace implicit/pattern rules with single markup incantation.
Combines msplit and envtpl to generate HTML files from any source.
Uses shell script as frontmatter in order to work with envtpl.
HTML rendering can be customized (i.e. not jut markdown)
If source markdown has no '---' frontmatter, msplit will forcibly
create an empty frontmatter file.
Add 'dest' config var to set destination directory.
User Makefile can set 'render' and 'ext' variables to customize
how HTML is generated from source pages.
The '-s' flag now can be set multiple times.
For safety, disallow command-line overriding of OUTDIR and PROGS.
When building site, HTML pages can now be wrapped in a layout
template by setting the makefile variable 'layout'.
Unixify cuss by splitting it into separate programs:
- envtpl: render envvar-based templates.
- msplit: splits frontmatter from markdown source.
- cuss.mk: the cuss makefile to be included in user Makefile.
Use template layout wrapping, instead of header/footer templates.
Page scripts can output any file type not just markdown.
To allow this, we make the .split file unique to source file.
Markdown pages in cuss can have a frontmatter to set variables.
It is simply a shell script, extracted and source'd. In this change,
pages in cuss can simply be a full-fledged shell script that outputs
the generated static content directly. If named 'page.md.sh', cuss
will convert the output to HTML, otherwise cuss will use it as-is.
Just a style change to match other util function's short names.
There are two funcitons using the `src=${1:--}`... test. This is a
DRY refactor to extract that test into a function.
Invert Makefile dependency. User's Makefile should
include cuss Makefile via 'include' directive.
Instead of running 'cuss make', user simply runs
'make' directly.
Replace implicit/pattern rules with single markup incantation.
Markdown pages in cuss can have a frontmatter to set variables.
It is simply a shell script, extracted and source'd. In this change,
pages in cuss can simply be a full-fledged shell script that outputs
the generated static content directly. If named 'page.md.sh', cuss
will convert the output to HTML, otherwise cuss will use it as-is.