1
0
mirror of https://github.com/mbirth/wiki.git synced 2024-12-24 22:54:09 +00:00

Added Atom RSS Feed.

This commit is contained in:
Markus Birth 2015-03-07 01:20:18 +01:00
parent 2b584a67ce
commit a8513cd90a
2 changed files with 23 additions and 0 deletions

View File

@ -10,6 +10,8 @@
<link rel="stylesheet" type="text/css" href="{{ site.url }}/css/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="{{ site.url }}/css/custom.css" media="all" />
<link rel="alternate" type="application/atom+xml" href="{{ site.url }}/feed.xml" />
{% if page.alternatives %}
<link rel="alternate" hreflang="{{ page.language }}" href="{{ site.url }}{{ page.url }}" />
{% for altpost in page.alternatives %}

21
feed.xml Normal file
View File

@ -0,0 +1,21 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for post in site.posts limit:20 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}/{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}/{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>