duz
duz
is a minimal static site generator for simple Djot
websites, written in bash. I designed it for my own websites.
duz
expects a directory containing a src
subdirectory as an argument. It
will traverse that directory, transforming any .dj
files it finds into .html
files using DMOS, which should be available
in PATH.
It has two special features:
-
Headers and Footers: If
_header.html
and/or_footer.html
files exist insrc
at the top level, it will prepend and append those, respectively, to all HTML files it generates. Table stakes for an SSG. It will not include the raw header and footer files in thedst
output. -
Atom Feed: You can optionally specify a directory (
/blog
by default) which, if it exists, will be given an Atom feed and index file. To facilitate this,.dj
files in this directory are expected to have the following front matter:Title 2024-05-06 +++
The first line is the title of the post, and the second line is the date
of the post in ISO-8601. The plus signs operate as a delimiter. This lets duz
generate a proper feed.
The directory used in this process is not expected to have any other content, or any subdirectories.
Other than these features, duz
passes files through untouched.
Usage
duz -h
Limitations
At the moment, the DMOS command arguments are not customizable. duz
always
uses dmos --toc
for the actual pages and raw dmos
without arguments for the
contents of the Atom feed.
If you use the Atom feed functionality, both a header and footer must exist, and
they must end and start with <body>
tags, respectively, for the Atom feed and
the index page to be valid. Also, for this folder, proper front matter (title on
the first line, ISO 8601 date on the second line) is required.
Contributions
I wrote duz
for my own use and it's a pretty quick-and-dirty little thing, but
if you like it, I welcome your contributions via git-send-email
patchset.