Skip to content

Instantly share code, notes, and snippets.

@jackmcdade
Created May 8, 2017 13:37
Show Gist options
  • Save jackmcdade/ded4a313dc12eb84aaaa9e835b090399 to your computer and use it in GitHub Desktop.
Save jackmcdade/ded4a313dc12eb84aaaa9e835b090399 to your computer and use it in GitHub Desktop.
Statamic RSS Feed
{{ xml_header }}
<rss version="2.0">
<channel>
{{ get_content from="/blog" }}
<title>{{ title | cdata }}</title>
<link>{{ site_url }}</link>
<description>{{ content | cdata }}</description>
{{ /get_content }}
<lastBuildDate>{{ collection:blog limit="1" }}{{ date format="r" }}{{ /collection:blog }}</lastBuildDate>
<language>en-us</language>
<copyright>Copyright {{ current_date format='Y' }}</copyright>
<ttl>3600</ttl>
{{ collection:blog }}
<item>
<title>{{ title | cdata }}</title>
<link>{{ permalink }}</link>
<guid>{{ permalink }}</guid>
<pubDate>{{ date format="r" }}</pubDate>
<description>{{ content | full_urls | cdata }}</description>
</item>
{{ /collection:blog }}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment