-
Using FeedBurner with Typo
Posted on July 12th, 2007 1 commentYou want to run your Typo blog feed through FeedBurner.
First, go to your blog’s admin page and click on the DESIGN tab. Drag the XML Syndication item from Available Items to Active Sidebar items. Choose either RSS 2.0 or Atom 1.0 according to what you choose when setting up FeedBurner. I selected Articles only because that’s what I want. Remember to click on the Publish changes button.
In your Typo app, modify
vendor/plugins/xml_sidebar/views/content.rhtmlto the following:<% if articles -%> <li><a href="<Your FeedBurner URL>" rel="alternate" type="application/rss+xml"><img src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="<Your FeedBurner URL>" rel="alternate" type="application/rss+xml">Subscribe</a></li> <% end %>
Of course you can use whatever image you like. The one shown above is linked to FeedBurner’s standard feed icon. You can use FeedBurner’s Chicklet Chooser to get the HTML code to paste into
content.rhtml.Another way is to set up a redirect using mod_rewrite in your Apache configuration (thanks to Robby):
# Redirect typo feeds to FeedBurner RewriteCond %{HTTP_USER_AGENT} !^FeedBurner.*$ RewriteRule /xml/(atom|rss|rss20)/feed.xml$ http://feeds.feedburner.com/rayvinly [R=temp,L]
In both cases, make sure you go to your blog admin’s SETTINGS tab, scroll to the bottom and click on Empty Fragment Cache.
Now go to your blog page and click on that Subscribe link to see your FeedBurner feed.
One response to “Using FeedBurner with Typo”
-
The trouble with the Apache redirect is that, with edge typo, those feed urls are no longer definitive. The new canonical urls are going to be http://host/articles.atom and http://host/articles.rss.
A better way would probably be to pull out the feed URL generation stuff from ContentHelper#page_header, add a
feedburner_urlfield to the blog settings and proceed from there.Patches welcome
Leave a reply
-



Recent Comments