Start with a Makefile. Pretend that your articles (article1.xml, article2.xml) are source code. Then object files (article1.html, article2.html) are compiled from single articles and a template, article.xml. Binaries (index.html are compiled from object files (or directly from sources) and a template, index.xml.

XMLS = article1.xml article2.xml ARTICLES = article1.html article2.html   all: index.html $(ARTICLES)   index.html: index.xml $(XMLS) sblg -o $@ -t index.xml $(XMLS)   .xml.html: sblg -o $@ -t article.xml $<



Articles are just content within the <article data-sblg-article="1"> tag. Some parts of articles are lifted out by sblg(1). These are used for populating navigation elements in the templates.

<article data-sblg-article="1"> <header> <h1>Title</h1> <address>My Name</address> <time datetime="2014-04-12">2014-04-12</time> </header> <aside> This is pulled out for the page synopsis. </aside> <p> And here we have some <q>content</q>. </p> </article>

You'll also need a template. For the compile mode, this is just a regular HTML file where the <article data-sblg-article="1"> tag is replaced by the page contents. For linking (or just blog) mode, you can also specify <nav data-sblg-nav="1"> to fill in all known articles, possibly tag-filtered.



sblg(1) is a utility for creating static blogs. It's built to work seamlessly with Makefiles, is in ISC licensed ISO C, and depends only on libexpat, which most operating systems bundle. You write your content in an HTML fragments; sblg(1) knits it together with templates, formats navigation, and so on. This entire site is built with sblg(1), as are quite a few others. To see how, look at the Makefile snippet. This is the main page; for articles, see the blog section for navigation.

To get started, download sblg.tar.gz (SHA512), decompress, and run make install. The current version is 0.2.6, released on . Version notes...



To read about the system, read the sblg(1) manual. I take great care in making sure that the manpage is up to date; less so the non-canonical howto and FAQ documents. That said, this is about blogs, so you might as well have some bloggy stuff.