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.


Hooray!

Does this version automatically insert 512 spaces to force Firefox 2 to respect the author’s XSLT?  Or is server-side XSLT processing the only solution you’re going to support?

Posted by Mark at

Sam Ruby: Themes for Planet

wearehugh : Sam Ruby: Themes for Planet Tags : aggregator feedparser planet venus...

Excerpt from HotLinks - Level 1 at

Sam Ruby: Themes for Planet

[link]...

Excerpt from del.icio.us/wearehugh at

Does this version automatically insert 512 spaces to force Firefox 2 to respect the author’s XSLT?

That doesn’t seem to me to be something to bake into the core.  Instead, it sounds like a common template that could be referenced by multiple themes.

Note: 512 spaces is only one possible solution.  Presuming the rules followed are the ones detailed here, using atom:feed should be enough to fool it, as should the mine type of text/html.

Another thing I should be able to do is to pass arbitrary values defined in the config.ini for the template in question as top level parameters to the stylesheet.

Posted by Sam Ruby at

That doesn’t seem to me to be something to bake into the core.

Neither does content sniffing for feeds, but I was outvoted.

Posted by Mark at

Neither does content sniffing for feeds, but I was outvoted.

Well. I would say the vote was

Microsoft Internet Explorer, Apple Safari: 2
Mark Pilgrim: 1

Posted by Robert Sayre at

OT, but somewhat Planet related: I notice that in Mark’s post for today he has a bunch of same-document fragment URIs, and Planet Intertwingly converts those into absolute URIs pointing to the feed document. Obviously that does not work very well.

The same thing happened a while back with one of my posts that contained a bunch of footnotes. At the time I didn’t say anything since I figured people would just tell me it was my fault and I didn’t want to argue. Now that it’s Mark’s problem I can happily point it out without having to get involved. ;)

Posted by James Holderness at

James, that was a bug in my feed template which should be fixed now.

Posted by Mark at

links for 2006-08-22

From the blogroll… Networks, Relationships and Knowledge Work in Extension So long, and thanks for all the Stargate Themes for Planet...

Excerpt from The Robinson House at

James, that was a bug in my feed template which should be fixed now.

If you insist. Your feed is still broken on Planet Intertwingly though - just in a different way.

Posted by James Holderness at

Define “broken”.

Posted by Mark at

Define “broken”

In the sense: “to infringe, ignore, or act contrary to (a law, rule, promise, etc.)” [Dictionary.com]

The law/rule/promise being RFC 3986: “When a same-document reference is dereferenced for a retrieval action, the target of that reference is defined to be within the same entity (representation, document, or message) as the reference; therefore, a dereference should not result in a new retrieval action”.

Posted by James Holderness at

I added xml:base attributes to the content elements, so your argument is invalid.  Planet is faithfully representing the information in my feed.

Posted by Mark at

I added xml:base attributes to the content elements, so your argument is invalid.  Planet is faithfully representing the information in my feed.

Amusingly, because my template is XHTML, I could include the xml:base in the enclosing div elements.  This would make the fully qualified URIs eligible to be considered as same-document references.

At which point, the feed would be correct.  The UFP would be correct.  Planet would be correct.  The template I used would be correct.  AND, the fact that browsers would perform a retrieval action when a user clicked on the URI would be allowed by the weasel wording of the spec.

The only reason I can imagine for doing so, however, is to enable me to smugly point to the sentence in the spec that clearly spells out how my software is technically correct, and then to crow about it on my blog.

Posted by Sam Ruby at

Amusingly, because my template is XHTML, I could include the xml:base in the enclosing div elements.  This would make the fully qualified URIs eligible to be considered as same-document references.

This still wouldn’t work in Firefox because it doesn’t support same-document references properly (see Bug 275689).

The only reason I can imagine for doing so, however, is to enable me to smugly point to the sentence in the spec that clearly spells out how my software is technically correct, and then to crow about it on my blog.

Or you could convert all same-document references into unqualified fragment URIs and everything would just work.

But if you’re happy with the way things are I’m not going to try and force you to change. I just wanted to point out the problem in case you cared.

Posted by James Holderness at

Venus

As the eagle-eyed among you may already have noticed, Planet Musings is now powered by Sam Ruby’s Venus. What...... [more]

Trackback from Musings

at

Add your comment