branches: rewrite master
Clone
clone: git://shithub.us/kvik/ugh gits://shithub.us/kvik/ugh
push: hjgit://shithub.us/kvik/ugh
patches to: [email protected]
Last commit
About
ugh!
====
ugh! is a website generator.
Theory of operation
-------------------
### Structure
The website source comprises page content files maintained under
top-level directory `data/`.
Top-level mk(1) targets drive the compilation of website source into
output directory `public/`.
The website template is defined by files in the `templates/` directory.
The templating engine is rc(1) heredocs—it is rather limited but should
be understandable.
The default template tries to load `public/css/style.css` stylesheet,
which doesn't exist by default.
### Transformation rules
Currently supported content files are markdown, html, and raw text.
Copies of the source files with `.html`, `.txt`, and `.md` extensions
are included verbatim in the output directory.
`.md` source files are compiled to an HTML page by a program
`bin/md2html`. In turn, this program passes the markdown source file as
a first argument to `bin/filter-markdown` which must produce HTML body
content on its standard output.
### Filters
`bin/filter-markdown` and other filters (in the future) may be replaced
by users to use different processors or perform custom processing.
Install
-------
Clone or copy this directory to a suitable place and make sure the
dependencies are met.
git/clone git://src.a-b.xyz/ugh /usr/web
### Dependencies
9front version of `rc(1)` and `mk(1)` are core dependencies.
**NB** Other versions of rc are guaranteed not to work.
The default markdown filter `bin/mdtohtml` depends on the
[discount(1)](https://github.com/Orc/discount) markdown processor.
You can easily change it to something else.
Use
---
Provide some content files in the `data/` directory and run:
mk
This will generate pages and files in the `public/` directory.
Publish it whichever way you like.