Created
June 24, 2014 13:40
-
-
Save thesowah/95d9596405316f9885b4 to your computer and use it in GitHub Desktop.
Jekyll Template for Atom, RSS feed. Template leaves HTML entities like — intact in XML + XSLT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: nil | |
title : Atom Feed | |
--- | |
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE xsl:stylesheet [<!ENTITY mdash "—">]> | |
<feed xmlns="http://www.w3.org/2005/Atom"> | |
<title type="text" xml:lang="en">{{site.name}}</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}}/all_feed</id> | |
<author> | |
<name>{{site.owner.name}}</name> | |
</author> | |
{% 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>{{site.url}}{{ post.id }}</id> | |
<content type="html">{{ post.content | xml_escape }}</content> | |
</entry> | |
{% endfor %} | |
</feed> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment