It’s just data

Themes for Planet

The next feature I added to Planet Venus (though it could easily be backported to classic Planet) is that of themes.

The basic idea is refactoring with an eye towards reducing the amount of configuration required to get started with planet.  And the implementation is quite simple:

A theme is a directory with a config.ini file in it, which specifies template_files, a bill_of_materials, and directories where to find these.  Standard planet configuration for those templates may also be included.

That’s pretty much it.

I imagine many themes will use common templates for producing feeds and the like.  I also imagine that there will be themes that are based on the same HTML template, differing only in the CSS; perhaps there will be ones centered around TypePad’s Custom CSS or WordPress’s Sandbox or even the hAtom microformat.

The bill of materials feature simplifies setup and deployment as files that are important to the theme but previously needed to be manually assembled — things like CSS, JavaScript, and images — are now automatically copied to the output_directory.

An implementation note: Mary Gardiner has indicated that she plans to look into htmltmpl support, meanwhile, I’ve added server side XSLT support based either on libxslt or xsltproc.  I find XSLT more powerful and easier to use than htmltmpl, but I understand that tastes vary.

Once I forward port Reading Lists to Venus, configuration files can be quite simple and stable.  Those with an OPML or FOAF file can get started by specifying only a theme and some simple things like the name of their planet and where to place the cache and output directories.