Skip to content

Instantly share code, notes, and snippets.

@gr36
Last active January 19, 2021 18:15
Show Gist options
  • Select an option

  • Save gr36/9d5bc0071021919a43f248757a3f5cc9 to your computer and use it in GitHub Desktop.

Select an option

Save gr36/9d5bc0071021919a43f248757a3f5cc9 to your computer and use it in GitHub Desktop.
Routes
routes:
/rss/:
template: /rss/
content_type: text/xml
collections:
/:
permalink: /{slug}/
template: index
filter: tag:-[links,newsletter,notes,micro]
/links/:
permalink: /links/{slug}/
template: index
filter: tag:[links]
order: published_at desc
/gtt/:
permalink: /gtt/{slug}/
template: index
filter: tag:[newsletter]
order: published_at desc
/notes/:
permalink: /notes/{slug}/
template: index
filter: tag:[notes]
order: published_at desc
/micro/:
permalink: /micro/{slug}/
template: index
filter: tag:[micro]
order: published_at desc
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title><![CDATA[ {{@blog.title}} ]]></title>
<description><![CDATA[ {{@blog.description}} ]]></description>
<link>{{@blog.url}}</link>
<image>
<url>{{@blog.url}}/favicon.png</url>
<title>{{@blog.title}}</title>
<link>{{@blog.url}}</link>
</image>
<lastBuildDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</lastBuildDate>
<atom:link href="{{@blog.url}}" rel="self" type="application/rss+xml"/>
<ttl>60</ttl>
{{#get "posts" limit="all" include="authors"}}
{{#foreach posts}}
<item>
<title><![CDATA[ {{title}} ]]></title>
<description><![CDATA[ {{excerpt}} ]]></description>
<link>{{url absolute="true"}}</link>
<guid isPermaLink="false">{{id}}</guid>
<category><![CDATA[ {{primary_tag}} ]]></category>
<dc:creator><![CDATA[ {{primary_author.name}} ]]></dc:creator>
<pubDate>{{date format="ddd, DD MMM YYYY HH:mm:ss ZZ"}}</pubDate>
<media:content url="{{feature_image}}" medium="image"/>
<content:encoded><![CDATA[ {{content}} ]]></content:encoded>
</item>
{{/foreach}}
{{/get}}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment