Skip to content

Instantly share code, notes, and snippets.

@omichelsen
Created October 16, 2015 11:11
Show Gist options
  • Save omichelsen/5345603b7a2230f18543 to your computer and use it in GitHub Desktop.
Save omichelsen/5345603b7a2230f18543 to your computer and use it in GitHub Desktop.
Jade: RSS
doctype xml
rss(version="2.0", xmlns:atom="http://www.w3.org/2005/Atom")
channel
title= title
link= url
description= description
language= language
atom:link(href="#{ url }feed.xml", rel="self", type="application/rss+xml")
each post, slug in public.blog._data
if slug !== 'index'
item
title= post.title
description <![CDATA[!{ excerpt(partial('blog/' + slug)) }]]>
pubDate= new Date(post.date)
link #{ url }blog/#{ slug }.html
guid(isPermaLink="true") #{ url }blog/#{ slug }.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment