Umbrellix Left politics, programming, and self-hosted Internet services: experiences, lessons and hope

compilesite.sh - the example script for compiling an UmbrellixSSG site

This script expects to find ussg-page in $PATH. It also has a commented directive to “make html/style.css” which would be arcane to you if you didn’t know that on both Umbrellix and ChatSpeed, ‘style.css’, the stylesheet those sites use, is managed through a traditional C preprocessor entry in a Makefile.

The site on Umbrellix.net doesn’t work well with Make the way ChatSpeed (a site where output and input are in the same directory) might.

That said, ChatSpeed uses legacy markdown (ussg-page -N) as well as USSG headed markdown, so it’s important that it, too, has a more intelligent system than just a Makefile.

Compilesite could be at the root of a staging directory (though it should not be in your site directory itself if your web server supports CGI that way).

The default compilesite looks for hmd and md format files in src/html, and outputs the generated html in html.

This compilesite checks for the existence of a .hmd file with the same name as .md files it finds, as well as lone .hmd. If it finds a .hmd, it will run in headed markdown mode, and disregard any .md. If it finds only a .md, it will run in legacy mode. If it is argued with the word quick, it will argue ussg-page with -Q, which will ask it to not run if output is newer than input.

Please tweak this script to your requirements. It is not production-ready as shipped.