summaryrefslogtreecommitdiff
path: root/software/web/src.md
diff options
context:
space:
mode:
Diffstat (limited to 'software/web/src.md')
-rw-r--r--software/web/src.md112
1 files changed, 112 insertions, 0 deletions
diff --git a/software/web/src.md b/software/web/src.md
new file mode 100644
index 0000000..37533f6
--- /dev/null
+++ b/software/web/src.md
@@ -0,0 +1,112 @@
+title: Website Maintenance Tools
+leading: A collection of tools for the maintenance of this website.
+opts: ch
+
+# Overview
+
+These scripts must be executed from within their residing directory only, and depend on adjacent files within it in order to function. For convenience it is recommended to create symlinks within this directory to all website directories under maintenance.
+
+# md.sh
+
+`md.sh` is a static site generator from Markdown files.
+
+The script may be executed with a single argument corresponding to the webpage directory containing the input Markdown file, which should be named `src.md`. The output HTML file, named `index.html`, will be located in the same directory.
+
+```
+./md.sh <target directory>
+```
+
+Alternatively, the script may be given two arguments, pointing to the input file and output file paths respectively.
+
+```
+./md.sh <input md> <output html>
+```
+
+## Dependencies
+
+- Required: [lowdown](https://kristaps.bsd.lv/lowdown), [fzy](https://github.com/jhawthorn/fzy)
+- Optional: any C compiler
+
+## Document Metadata
+
+The input file may begin with metadata key-value declarations, as specified by [lowdown(5)](https://kristaps.bsd.lv/lowdown/lowdown.5.html#Metadata). `md.sh` recognizes and formats the following:
+
+- `title`, for the HTML page title;
+- `bomber`, for the header splash text;
+- `leading`, for the page's leading phrase;
+- `opts`, for further configuration options described below.
+
+Page options are denoted by any combination of the following characters:
+
+- `c`, to generate a table of contents;
+- `f`, to suppress generation of the page footer;
+- `h`, to suppress generation of the page header.
+
+The table of contents generation may malfunction if two header names are identical within the page.
+
+# plain.sh
+
+`plain.sh` converts plain text files to HTML documents.
+
+```
+./plain.sh <input txt> <output html>
+```
+
+## Page Title
+
+The HTML page title may be specified within the input document using the following declaration:
+
+```
+<!--title: ... -->
+```
+where `...` is the page title.
+
+# svgtex.sh
+
+`svgtex.sh` renders LaTeX math mode commands as SVG files.
+
+```
+echo "<equation>" | ./svgtex.sh <output path>
+```
+
+# Other Tools
+
+## front.sh
+
+`front.sh` generates the [front page](/).
+
+```
+./front.sh <output html>
+```
+
+## nav.sh
+
+`nav.sh` generates the sitemap navigation pane. Installation of [tree](http://mama.indstate.edu/users/ice/tree/) is required.
+
+```
+./nav.sh <source dir> <output file>
+```
+
+## reload.sh
+
+`reload.sh` is a meta-script which updates the website's front page, navigation listings, and XML sitemap, and can optionally regenerate all of the webpages at once.
+
+```
+./reload.sh [-r]
+```
+
+## sitemap.sh
+
+`sitemap.sh` generates the website's [XML sitemap](/sitemap.xml), as specified by [sitemaps.org](https://www.sitemaps.org/protocol.html).
+
+```
+./sitemap.sh <target dir> <output xml>
+```
+
+## urlencode
+
+`urlencode` is a small C program which converts a string into a URL-encoded format.
+
+```
+echo "<string>" | ./urlencode
+```