sblg – simple off-line blog utility

Version 0.4.6, 2017-09-23

This is an example of an individual article. It consists of a template (article.xml) merged with article contents.

Tips and Tricks: Tag Symbols

Posted by
Kristaps Dzonsons

Tag symbols appear in XML input files and templates and are filled in with information pertaining to the current relevant article. For example, the default navigation list can be customised by specifying re-use of internal contents and using tag symbols. This can be seen in the blog-roll and are described in Tips and Tricks: Fancy Navigation.

Tags are even more useful in standalone amalgamation mode described in sblg(1), which is how this file was created:

% sblg -o article9.html -C article9.xml article1.xml ... article9.xml

Note: using this invocation is the same reason why the permanent link below this page doesn't work properly! (This is described in sblg(1), and is a known caveat to be solved later.)

Now if I use the ${sblg-prev-base} to show the previous article when chronologically ordered. To do this, I embedded the ${sblg-prev-base}.html link into the anchor. If I specify the ${sblg-prev-base} (note that in both cases, I HTML-escaped the dollar sign in this article so it wasn't interpreted as a tag itself!) it goes to the next article, wrapping around to the oldest if it's the newest.

permanent link