Nick Bowler [Wed, 24 Jun 2020 04:41:47 +0000 (00:41 -0400)]
Make permalinks in section headers optional.
These permalinks seem useful for licenses but maybe not so much
in general. Let's make that controllable per-document by adding a
parameter to the XSL layout to select whether or not they will
be generated.
Nick Bowler [Thu, 27 Feb 2020 18:50:46 +0000 (13:50 -0500)]
Convert stylesheet to SCSS and preprocess with SASS.
This CSS preprocessing tool seems pretty helpful for reducing repetition
in stylesheets. While it does not make much difference now I hope to
make more use of its features in the future.
Nick Bowler [Sun, 21 Jun 2020 16:14:01 +0000 (12:14 -0400)]
Add spaces in self-closing XML tags.
Some very old browsers that do not implement XHTML get confused by
tags like <hr/> but have no problem with <hr />. This is very easy
to accomodate so let's do it.
Nick Bowler [Thu, 10 Jan 2019 03:00:58 +0000 (22:00 -0500)]
Add a postprocess hook to gzip output text items.
This enables the use of nginx gzip_static functionality, reducing
per-request processing. This is only done if GZIP_SITE is set to
a nonempty value in the environment so it can be run only when
publishing to avoid noise when authoring.
Nick Bowler [Wed, 9 Jan 2019 01:23:36 +0000 (20:23 -0500)]
Work around Nokogiri pretty-print issues.
In general, pretty-printing XHTML will change its meaning because
whitespace added or removed can affect the results. Instead of using
the xsl:strip-space functionality which is quite limited, use a normal
template to remove unwanted whitespace-only text nodes which can be
manually tweaked as required.
Then we explicitly add dummy nodes to prevent Nokogiri from reindenting
problematic cases, and finally clean those out just before publishing
(after all XSLT processing is finished).