Here is an updated atomfeed plugin that supports Atom 1.0: download atomfeed.
Changes since the last beta version:
- Moved variable configuration to head sub
- Added simple entity-unescaping in generation of the
element - Adjusted the
xml:baseattribute to reflect$id_domainrather than$blosxom::url, and added the attribute at feed-level as well as for each entry
This plugin offers basic support for most of the specification, which should be enough for the vast majority of users. Not currently supported are the and elements. has been excluded as it seems an element more aimed at those publishing feeds aggregated from other feeds. probably could be supported, but would have been a bit of a kludge without the use of metadata – so anyone who needs this element could use the meta plugin and a custom template.
Of course, Atom is designed to be flexible and extensible and there are already people out there imagining losts of uses for the format – see this article at IBM Developer Works for some ideas (via Tim Bray). This plugin can never hope to cater for all possible uses, but it should be enough to provide the bare bones that others can build upon to meet their own needs.
The plugin comes with flavour templates and extensive documentation, including a list of all the variables it makes available for use in templates, notes on compatibility issues with other plugins and suchlike. I’ve extracted some of the major points below, but see the plugin itself for more complete notes.
- The plugin has a large number of configurable variables and generates an even larger number of template variables. However, it is designed to be usable with only minimal configuration: set the variables
$default_authorand$feed_yr, drop the plugin into your$plugins_dirand off you go. - The plugin is intended to work with nothing but
blosxom.cgiand a standard perl installation, but it will perform better if theXML::ParserandLWPmodules are installed, and if you are using a plugin like entries_cache that stores the creation times of your posts. - If you are modifying the content of your entries using other plugins, particularly any that escape characters or add markup (like some of these), you should have them run before the atomfeed plugin. You want atomfeed to get each post in the state that it would be sent to a normal web browser.
- Similarly, if you intend to use the config or prefs plugins to modify any of the variables generated by the plugin, they will need to run before it.
- Podcasters: enclosures are supported. You need to link to your enclosure in the body of your weblog post, and provide the anchor tag with a
relattrubute of “enclosure”. For example:<a rel="enclosure" href="http://example.com/podcasts/august-05.mp3">Podcast for 5th August</a>. If you have theLWPmodule and you change the$use_full_enclosuresconfigurable variable to “1″, the plugin will also include data on the length and content type of the enclosure (this is recommended as good practice). - You can include “related” and “via” links using a similar method – just ensure the anchor tags have an appropriate
relattribute for these links to be included in your feed as correspondings.
Please post any feedback you have to the blosxom mailing list, maybe as a follow-up to this post.