Created
April 11, 2011 17:50
-
-
Save dpk/913932 to your computer and use it in GitHub Desktop.
The usage of Plan's Atom feed generator, based on Rails' atom_feed Builder handler. It works by generating SXML which is then turned into the actual XML of the feed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(atom-feed | |
(title "David's Weblog") | |
(subtitle "An awesome weblog") | |
(link 'self "http://dpk.org.uk/feed/") | |
(each post (posts 20) | |
(entry | |
(title (post 'title)) ; maybe do an automagic thing to detect dictionary items with the same name as atom properties? | |
(id (tag-uri post)) | |
(link 'alternate (post 'permalink)) ; could be automagic, too | |
(published (post 'pub-date)) ; automagic? | |
(updated (post 'upd-date)) ; " ? | |
(author '(name "David Kendal")) | |
(content (post 'body))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment