Mac OS X Server 10.4.3 or later supports RSS2 enclosures and podcasting. Although the server includes the basic RSS2 tags needed for podcasting, it doesn't include the required tags to submit podcasts to the iTunes Store. This article shows how to modify the RSS2 template so that blog entries from the Weblog Server can be considered for publication on the iTunes Store.
To find more information about the iTunes-specific RSS2 tags, click here.
Note: This advanced how-to requires you to edit XML-formatted text files. Apple does not provide any further technical support or assistance with performing this task.
<?xml version="1.0"?> <!-- name="generator" content="$BLOJSOM_VERSION" --> <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"> <channel> <title>$BLOJSOM_BLOG.getBlogName()</title> <link>$BLOJSOM_BLOG.getBlogURL()</link> <description>$BLOJSOM_BLOG.getBlogDescription()</description> <language>$BLOJSOM_BLOG.getBlogLanguage()</language> <image> <url>$BLOJSOM_SITE_URL/favicon.ico</url> <title>$BLOJSOM_BLOG.getBlogName()</title> <link>$BLOJSOM_BLOG.getBlogURL()</link> </image> <itunes:author>www.demo.edu</itunes:author> <itunes:owner> <itunes:name>Demo University</itunes:name> <itunes:email>podcast@demo.edu</itunes:email> </itunes:owner> <itunes:link rel="image" type="video/jpeg" href="http://www.demo.edu/demo_u.jpg">About Demo University</itunes:link> <itunes:category text="Education"> <itunes:category text="Higher Education"/> </itunes:category> <copyright>Copyright 2005 demo.edu</copyright>
#foreach ($entry in $BLOJSOM_ENTRIES) <item> <title>$entry.getEscapedTitle()</title> <link>$entry.getEscapedLink()</link> <description>$entry.getEscapedDescription()</description> <itunes:author>$BLOJSOM_BLOG.getBlogOwner() from demo.edu</itunes:author> <itunes:subtitle>Boost your knowledge at Demo University</itunes:subtitle> <itunes:summary>Episodes from demo University.</itunes:summary> <itunes:category text="Education"> <itunes:category text="Higher Education"/> </itunes:category> <itunes:explicit>no</itunes:explicit> <itunes:keywords>education college university lecture</itunes:keywords>Note: In the example above, we're editing the default rss2.vm file. As a result, all of the information above is static except for the variable used for the blog owner. When editing the default rss2.vm file, all information will be the same for every item of every blog on the server. However, you can make a blog-specific template and use it to override the default, thus achieving different RSS templates for different blogs.
/Library/Tomcat/blojsom_root/webapps/ROOT/WEB-INF/<username>/templatesIf you put a modified copy of rss2.vm in the folder, the weblog server will use that template instead of the one in /WEB-INF/templates, because the user-specific file takes precedent over the main template when present. With this method, only the information in that specific blog will have the customized tags.
To test your blog site to make sure that the RSS2 links function properly, go to a blog and click on the RSS2 or RSS Podcast links. You shouldn't see any of the tags or information you entered. These tags are only used by the iTunes Store. If any of the information is displayed incorrectly, revise your edits in the RSS2.vm file or revert to the backup copy you made.
Tip: You can see your custom tags by using the command-line utility curl. In Terminal, type:
curl "http://<server address>:<port>/weblog/<user shore name>/?flavor=rss2"
For example, let's say your server address is www.demo.edu, it's running on port 80, and your user's shortname is "joe." You'd then type this curl command in the Terminal:
curl "http://www.demo.edu/weblog/joe/?flavor=rss2"
This will return the RSS2 xml text from the web server. The custom iTunes Store tags should be returned.