kvik/ugh

Description
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.
Last 5 commits (shortlog)
Date Author Short message Commit hash
2020-07-30 kvik mksitemap: add sitemap generator ee19f22be32c725ab41c27918de1e6240d1866fc
2020-07-29 kvik Revert accidental change bd34d60603cd062af02b0681c9e625b59f1893cd
2020-07-29 kvik Add an empty style.css to silence the browsers 0f2ddfa2e4d8bbc1200fbb35e5006b375c4dbd56
2020-07-29 kvik Make cfg/ configuration system 6c8cdffcbb31b74008f8fa14a26d6ad524850802
2020-07-28 kvik Ignore the data/.git repository aa397fe2ffceabe962d70930ed220952c893feb0
Files (browse)
README.md
bin/
cfg/
mkfile
public/
templates/