Re-add RSS feed
This commit is contained in:
parent
29734d6b36
commit
8d2823f835
|
@ -25,9 +25,9 @@ menus:
|
|||
-
|
||||
title: Recommendations
|
||||
href: /recommendations
|
||||
#-
|
||||
# title: RSS feed
|
||||
# href: \#
|
||||
-
|
||||
title: RSS feed
|
||||
href: /rss.xml
|
||||
-
|
||||
title: Uses
|
||||
href: /uses
|
||||
|
|
34
source/rss.xml.twig
Normal file
34
source/rss.xml.twig
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
permalink: /rss.xml
|
||||
use:
|
||||
- posts
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title><![CDATA[{{ site.title }}]]></title>
|
||||
<link href="{{ site.url }}{{ page.url }}" rel="self"/>
|
||||
<link href="{{ site.url }}"/>
|
||||
<updated>{{ site.calculated_date|date('c') }}</updated>
|
||||
<id>{{ site.url }}/</id>
|
||||
{% if site.author or site.email %}
|
||||
<author>
|
||||
{% if site.author %}<name><![CDATA[{{ site.author }}]]></name>{% endif %}
|
||||
</author>
|
||||
{% endif %}
|
||||
<generator uri="http://sculpin.io/">Sculpin</generator>
|
||||
{% for post in data.posts|slice(0, 10) %}
|
||||
<entry>
|
||||
<title type="html"><![CDATA[{{ post.title }}]]></title>
|
||||
<link href="{{ site.url }}{{ post.url }}"/>
|
||||
<updated>{{ post.date|date('c') }}</updated>
|
||||
<id>{{ site.url }}{{ post.url }}</id>
|
||||
{% if post.summary %}
|
||||
<content type="html"><![CDATA[{{ post.summary|markdown }}]]></content>
|
||||
{% elseif post.blocks.excerpt %}
|
||||
<content type="html"><![CDATA[{{ post.blocks.excerpt|markdown }}]]></content>
|
||||
{% else %}
|
||||
<content type="html"><![CDATA[{{ post.blocks.content|markdown }}]]></content>
|
||||
{% endif %}
|
||||
</entry>
|
||||
{% endfor %}
|
||||
</feed>
|
Loading…
Reference in a new issue