Skip to content

Instantly share code, notes, and snippets.

@djyde
Created January 6, 2016 14:46
Show Gist options
  • Save djyde/4093d480d813c4570c3a to your computer and use it in GitHub Desktop.
Save djyde/4093d480d813c4570c3a to your computer and use it in GitHub Desktop.
itunes feed
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
<channel>
<link><%- encodeURI(url) %></link>
<language>zh-CN</language>
<copyright>&amp;#x2117; &amp;amp; &amp;#xA9; 2016 JSNext.fm</copyright>
<itunes:author>JSNext.fm</itunes:author>
<itunes:summary>JSNext Podcast 是由 Randy, Howard, 阴明 主持的前端技术类中文播客节目,讨论时下前端技术相关的一切,争取每期邀请符合主题的优秀工程师一起聊聊。希望用 podcast 形式记录前端技术发展重要的每一步。</itunes:summary>
<description><%-: config.description %></description>
<itunes:owner>
<itunes:name>JSNext.fm</itunes:name>
<itunes:email>[email protected]</itunes:email>
</itunes:owner>
<itunes:image href="http://7xprtg.com1.z0.glb.clouddn.com/jsnext-1400.png"></itunes:image>
<itunes:category text="Technology"/>
<itunes:category text="Software How-To"/>
<title><%-: config.title %></title>
<itunes:subtitle>Chinese front-end podcast</itunes:subtitle>
<pubDate><%= posts.first().updated.toDate().toUTCString() %></pubDate>
<% posts.each(function(post){ %>
<item>
<title><%-: post.title %></title>
<itunes:author>JSNext.fm</itunes:author>
<itunes:subtitle><%- post.subtitle %></itunes:subtitle>
<% if(post.excerpt) { %>
<itunes:summary type="html"><%- escape(post.excerpt) %></itunes:summary>
<% } %>
<itunes:image href="http://7xprtg.com1.z0.glb.clouddn.com/jsnext-1400.png"></itunes:image>
<enclosure url="<%- post.resource %>" type="audio/mpeg" />
<pubDate><%= post.date.toDate().toUTCString() %></pubDate>
<itunes:duration><%- post.duration %></itunes:duration>
<link><%- encodeURI(url + post.path) %></link>
<guid><%- encodeURI(url + post.path) %></guid>
<description>
<% if (post.description){ %><%-: post.description | cdata %>
<% } else if (post.excerpt){ %><%-: post.excerpt | cdata %>
<% } else {%><%-: post.content.substring(0, 140) | cdata %><% } %>
</description>
</item>
<% }) %>
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment