Jul15

Atom 1.0 template for Movable Type

I just finished my Atom 1.0 feed template for Movable Type. I believe it is compliant with the Atom 1.0 specification and my feed validates according to Feed Validator.

I will not switch my blog's advertised Atom feed from 0.3 to 1.0 until Bloglines, NetNewsWire, and NewsGator support Atom 1.0 format.

Tags: ,

17 Comments

Commentary on "Atom 1.0 template for Movable Type":

Subscribe to new comments

  1. Author Profile Page aharden on July 15, 2005 at 12:40 PM wrote: #

    Niall, thanks for the template. I had to close the "updated" tag to get it to validate.
  2. ? Niall Kennedy on July 15, 2005 at 2:09 PM wrote: #

    Thanks! I added the updated element at the last minute because it looks like the specification requires it even though my feed was validating without it. As far as I know Movable Type does not have a global template tag for the last modified entry date in any entry so I had to use the modified date of the last entry.
  3. Robert Sayre on July 16, 2005 at 4:23 PM wrote: #

    Hi Niall, you want <content type="html" with no div inside.
  4. ? Niall Kennedy on July 17, 2005 at 11:00 AM wrote: #

    Thank you Robert. I fixed my template and my feed per your instructions.
  5. Author Profile Page g026r on July 18, 2005 at 1:58 PM wrote: #

    Just out of curiousity: are the MTEntryModifiedDate tag and the utc attribute available by default in 3.2, or do you still have to use a plugin to get at them?
  6. ? Niall Kennedy on July 18, 2005 at 2:28 PM wrote: #

    g026r, There are many undocumented template tags and attributes for Movable Type. MTEntryModifiedDate does support the utc attribute without any plugins.
  7. Author Profile Page g026r on July 19, 2005 at 11:25 AM wrote: #

    Thanks, Niall. I wasn't aware that those tags were included by default now, as it wasn't showing up in my locally installed documentation. (I have, however, discovered why: mod_gzip was messing up, and hadn't updated the compressed copies of the files to reflect the fact that they'd changed. Therefore I was getting the MT 2.63 documentation. Yay, another problem to fix...)
  8. Jason on July 21, 2005 at 8:46 AM wrote: #

    Niall, thank you for this -- it's nice to see I don't have to reinvent the wheel on this.
  9. Author Profile Page Jason Levine on July 21, 2005 at 8:56 AM wrote: #

    One comment -- you're using the permalink for the id element on each entry. Check out Mark Pilgrim's "How to make a good ID in Atom", which makes some persuasive arguments not to use a permalink; it's worth a thought.
  10. Author Profile Page Phil Ringnalda on July 25, 2005 at 10:10 PM wrote: #

    Hmm. Interesting problem with your plain-text summaries, that I don't think can be fixed without another global filter. You have encode_xml="1" on them, which does a bunch of harmless stuff you don't need, converting quotes and apostrophes to named entities, and also does two things you might need, whether you need them or not. Any ampersand or less-than gets converted to a named entity, which would save your bacon if you let through a literal one of either, but because you are careful and never type one in your post without escaping it, encode_xml double-escapes them, which means that your plain-text summary has them still escaped when it comes out the other end, leaving you saying that "1 &lt; 2" instead of "1 < 2" I don't see any way around that other than having encode_text_xml, which first decodes HTML entities, and then escapes XML-significant characters. (You could do it with decode_html="1" encode_xml="1" if order was guaranteed, but last I remember it wasn't. Though, I think I did file a bug on that, so maybe now it is.)
  11. Author Profile Page Phil Ringnalda on July 25, 2005 at 10:46 PM wrote: #

    Double hmm. feed/id as <MTBlogURL> followed by a space? Not only do you have the problems Jason refers to when using a changeable URI as an id, but that space is awfully risky: it's just begging for someone to screw up and percent-encode it.
  12. Author Profile Page Phil Ringnalda on July 25, 2005 at 10:56 PM wrote: #

    You've got the email and MTIfNonEmpty tags swapped, so if the last post was written by an author without an email address, you'll produce not-well-formed XML.
  13. Jakob S on August 22, 2005 at 1:37 AM wrote: #

    Thanks Niall, looks like my site will finally produce an Atom-feed ;)
  14. Gerald on October 23, 2005 at 3:25 AM wrote: #

    Thanks for the template.

    Feedvalidator is blowing me out and I don't understand why.

    The offending line is: <category term="/home_garden" scheme="http://www.flanerie.org/archives/" label="<![CDATA[Home & Garden]]>" />

    And similar lines appear elsewhere in the feed, including ampersands, so I don't know why this line fails and others don't.

    Any chance you could take a look?

    The feed is at: http://flanerie.org/atom.xml

    Thanks

  15. ? Niall Kennedy on October 23, 2005 at 8:15 AM wrote: #

    I am using the NoCDATA configuration derivative in Movable Type.
  16. Author Profile Page Leon Krijnen on December 18, 2005 at 2:38 AM wrote: #

    Good job Neil, thanks for the template. My atom feed is valid now. Just one warning regarding the utf-8 encoding, I'll sort that out. Kind regards, Leon, The Netherlands.
  17. Author Profile Page bloodnok on May 17, 2006 at 12:21 PM wrote: #

    perfect! thanks for the template.

Add a comment

Some comments may be placed in a moderation queue to ensure topical relevancy. You may contact author Niall Kennedy directly if you prefer to comment privately.


(not published)



Niall Kennedy Niall Kennedy is a web technologist in San Francisco, California in the United States. I am very interested in the world of... MORE »

Search this weblog:

Subscribe:

Latest feature: Widget development

Archives: Popular Categories