Skip to content

Instantly share code, notes, and snippets.

@Andy-set-studio
Created June 18, 2019 09:58
Show Gist options
  • Save Andy-set-studio/2633d735b7a4503db493036fd2987a1c to your computer and use it in GitHub Desktop.
Save Andy-set-studio/2633d735b7a4503db493036fd2987a1c to your computer and use it in GitHub Desktop.
RSS template
---
permalink: '/feed.html'
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.name }}</title>
<subtitle></subtitle>
<link href="{{ site.url }}{{ permalink }}" rel="self"/>
<link href="{{ site.url }}/"/>
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ site.authorName }}</name>
<email>{{ site.authorEmail }}</email>
</author>
{% for post in collections.posts %}
{% set absolutePostUrl %}{{ site.url }}{{ post.url | url }}{% endset %}
<entry>
<title>{{ post.data.title }}</title>
<link href="{{ absolutePostUrl }}"/>
<updated>{{ post.date | rssDate }}</updated>
<id>{{ absolutePostUrl }}</id>
<content type="html">{{ post.templateContent | safe }}</content>
</entry>
{% endfor %}
</feed>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment