KEW
super simple static site supplier
SYNOPSIS
kew <in> <out>
DESCRIPTION
kew is a minimal static site generator inspired by werc. It transforms a directory tree containing Markdown files and static assets into a fully static HTML website.
The filesystem defines structure, navigation, and meaning. There is no metadata, database, runtime server, or dynamic behaviour.
OPERATION
Given an input directory and an output directory, kew does this:
- recursively walks the input directory tree
- mirrors the directory structure into the output directory
- copies all non-Markdown files
- converts all
.mdfiles into.htmlusinglowdown - shoves all generated HTML pages in a single global HTML template
- generates navbar from the directory hierarchy
The resulting output directory is suitable to be directly served by any HTTP server.
MARKDOWN PROCESSING
Markdown files are converted to HTML using lowdown.
For every file:
page.html -> page.html
Relative links referring to .md files are rewritten to point to the correct .html files.
TEMPLATE
The HTML template is a regular HTML file located at the root of the input directory. Its filename is defined at compile time.
The template should contain the following placeholders:
{{TITLE}}- replaced with the site title{{NAV}}- replaced with the generated navbar HTML{{CONTENT}}- replaced with the page contentmade with kew- replaced with footer text
All pages use the same template. No per-page templating is supported.
FILE LAYOUT
Example input layout:
in/
|-->index.md
|-->docs/
| |-->system/
| |-->init.md
| |-->networking/
| |-->ethernet.md
|
|-->style.html
|-->template.html
Corresponding output layout:
out/
|-->index.html
|-->docs/
| |-->system/
| |-->init.html
| |-->networking/
| |-->ethernet.html
|
|-->style.html
|-->template.html
CONFIGURATION
kew
Edit config.go then recompile.
Configuration values:
- Site title
- Footer text
- Template filename
- Navigation symbols
EXIT STATUS
Standard exit status.
DEPENDENCIES
lowdown
PHILOSOPHY
kew is intentionally opinionated, trying to follow the UNIX philosophy well enough.
Users are expected to understand basic filesystem concepts.
SEE ALSO
lowdown, httpd
AUTHORS
kew was written by uint.