Skip to content

Instantly share code, notes, and snippets.

@svandragt
Forked from stammy/index.xml
Last active August 29, 2015 14:00
Show Gist options
  • Save svandragt/11173136 to your computer and use it in GitHub Desktop.
Save svandragt/11173136 to your computer and use it in GitHub Desktop.
Generalized atom.xml to use with jekyll (validates)
---
layout: nil
---
<?xml version="1.0" encoding="utf-8"?>
<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 }}/atom.xml" rel="self"/>
<link type="text/html" href="{{ site.url }}" rel="alternate"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}/</id>
<author>
<name>{{ site.author}}</name>
</author>
{% for post in site.posts limit:10 %}
<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"><![CDATA[{{ post.content }}]]></content>
</entry>
{% endfor %}
</feed>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment