From 5b432fcc0bdee654b225ca2b47cc505e8fb1cf12 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sun, 27 Jun 2021 00:00:19 +0200 Subject: hswg: add a minimal README.adoc Moving the example script from somewhere else. --- README.adoc | 4 +--- hswg/README.adoc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 hswg/README.adoc diff --git a/README.adoc b/README.adoc index 982c287..9f43933 100644 --- a/README.adoc +++ b/README.adoc @@ -96,9 +96,7 @@ Only UTF8_STRING-convertible selections are synchronized. hswg -- static website generator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Wraps libasciidoc to make it understand more syntax, namely two-line/underlined -titles, and can be run either as an AsciiDoc processor for my Gitea, or as -a trivial wiki-like site generator. +link:hswg/README.adoc[See hswg's README for details.] ht -- terminal emulator ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/hswg/README.adoc b/hswg/README.adoc new file mode 100644 index 0000000..3cefe5b --- /dev/null +++ b/hswg/README.adoc @@ -0,0 +1,62 @@ +hswg: a static website generator +================================ + +hswg wraps libasciidoc to make it understand more syntax, namely +two-line/underlined titles, and can be run either as a filter, or as a simple +wiki-like site generator. + +Gitea/cgit AsciiDoc processor +----------------------------- +Wrap hswg in the following script to give it a few superpowers: + +``` +#!/bin/sh +# Make this also work for cgit which, strangely enough, is willing to render +# /anything/ via the /about route, only passing through image/* unchanged. +if [ -z "$GITEA_PREFIX_SRC" ]; then + test "${1%.adoc}" != "$1" || exit 1 + cgit_fixups='s/