trying atom feed

This commit is contained in:
Set Hallstrom 2020-11-10 10:34:11 +01:00
parent b0bbc20e5e
commit 44e834fcb4
3 changed files with 30 additions and 5 deletions

25
atom.xml Normal file
View file

@ -0,0 +1,25 @@
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text" xml:lang="en">{{ site.title }}</title>
<link type="application/atom+xml" href="{{ site.url }}/feed.xml" rel="self"/>
<link type="text/html" href="{{ site.url }}/" rel="alternate"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}/feed.xml</id>
<author>
<name>{{ site.publisher.name }}</name>
</author>
<rights>Copyleft {{ site.time | date: '%Y' }} {{ site.publisher.name }}</rights>
{% for post in site.posts limit:20 %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>home_url{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
</feed>