Creating an RSS feed in

by Knut Martin Tornes - July 25 2016

In you can easily serve many different content types. Creating an RSS feed is done simply by creating a Page, set up the data context/query, write the necessary XML markup and finally set the content type to text/xml.

The RSS feed we have created for this blog does not have any "View Source" like the other pages, but you can see it here.
    "posts": {
        "collection": "blogposts",
        "query": {"published":true},
        "hints": {"$orderby":{"date":-1}}
<!--?xml version="1.0" encoding="UTF-8" ?-->
<rss version="2.0">
 <title> blog postings</title>
 <description>This RSS feed was created with Pages</description>
 <pubdate>{{moment posts.0._updated 'ddd, DD MMM YYYY HH:mm:ss'}}</pubdate>
 {{#each posts}}
   <pubdate>{{moment date utc=true add="hours" value="4" format="ddd, DD MMM YYYY HH:mm:ss"}}</pubdate>


View Source