sblg – static blog utility

v0.5.3, 2019-08-16

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

What about feeds?

Posted by
Kristaps Dzonsons
on

sblg will generate Atom feeds when given the -a flag. Its behaviour follows sblg(1)'s description of blog mode. All you need to do is provide an Atom template; the <entry>, <updated>, and <id> (the <id> field must occur after the <link>) fields will be automatically filled in.

This site has a dummy atom.xml for each of this page's articles.

<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>sblg Example Feed</title> <link href="http://kristaps.bsd.lv/sblg/atom.xml" rel="self" /> <link href="http://kristaps.bsd.lv/sblg" /> <id data-sblg-id="1" /> <updated data-sblg-updated="1" /> <entry data-sblg-entry="1" /> <entry data-sblg-entry="1" /> <entry data-sblg-entry="1" /> </feed>

Filled-in entries consist of <title>, <id>, <updated>, <author>, and alternate <link> elements. If specified in the original article, a <content> element will consist of an HTML article summary, or the full article if so specified. See the sblg(1) manual for details. Or making it shorter…

<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>sblg Example Feed</title> <link href="http://kristaps.bsd.lv/sblg/atom.xml" rel="self" /> <link href="http://kristaps.bsd.lv/sblg" /> <id data-sblg-id="1" /> <updated data-sblg-updated="1" /> <entry data-sblg-forall="1" data-sblg-entry="1" /> </feed>

Remember to link to the feed in your blog template or article template file!