2010-01-05
Per-tag RSS feeds for Tumblr
I didn’t think that Tumblr offered per-tag RSS feeds, but after spending some time trying to hack the JSON output from the Tumblr API into my aggregated front page, I tried appending “/rss” to the URL of one of my tag archive pages, and somewhat to my surprise, it worked.
Of course, RSS is more useful if it’s discoverable, so in addition to the standard
<link rel="alternate" type="application/rss+xml"
title="All items (RSS)" href="{RSS}"/>
I’ve added
{block:TagPage}<link rel="alternate"
type="application/rss+xml" title="Items with this tag (RSS)"
href="/tagged/{Tag}/rss"/> {/block:TagPage}
The second line uses Tumblr’s custom themes, in particular the {block:TagPage} element, to only advertise the RSS feed (through the standard autodiscovery syntax) on tag archive pages. This is in addition to the standard feed; you can decide between them thanks to the descriptive titles.
If you use tags and a custom theme, think about adding the same: it might help people who want to follow a particular subject.