No plugin needed for a xml feed
authorJoerg Jaspert <joerg@debian.org>
Sat, 20 Feb 2016 14:06:26 +0000 (15:06 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 20 Feb 2016 14:06:26 +0000 (15:06 +0100)
_config.yml
_layouts/default.html
atom2.xml [new file with mode: 0644]

index 9472094..48098fd 100644 (file)
@@ -9,7 +9,6 @@ author:
 gems:
   - jekyll-paginate
   - jekyll-archives
-  - jekyll-feed
   - jekyll-sitemap
 
 permalink: /:year/:month/:slug.html
@@ -21,9 +20,6 @@ timezone:            Europe/Berlin
 
 highlighter: rouge
 
-feed:
-  path: atom.xml
-
 markdown: rdiscount
 rdiscount:
   extensions:
index 63fe217..d995236 100644 (file)
@@ -10,7 +10,7 @@ layout: compress
   <meta name='description' content="{{description}}">
   <meta name='author' content="{{auth.name}}">
   <meta name='viewport' content='width=device-width, initial-scale=1.0, minimum-scale=1.0'>
-  {% feed_meta %}
+  <link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Ganneff's Little Blog" />
   <link href="/assets/css/style.css" rel="stylesheet" />
   <link rel='canonical' href="{{site.url}}{{page.url}}">
 
diff --git a/atom2.xml b/atom2.xml
new file mode 100644 (file)
index 0000000..7bcaec0
--- /dev/null
+++ b/atom2.xml
@@ -0,0 +1,51 @@
+---
+---
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <generator uri="http://jekyllrb.com" version="{{ jekyll.version }}">Jekyll</generator>
+  <link href="{{ page.url | prepend: site.url | append: site.baseurl }}" rel="self" type="application/atom+xml" />
+  <link href="{{ site.url | append: site.baseurl }}/" rel="alternate" type="text/html" />
+  <updated>{{ site.time | date_to_xmlschema }}</updated>
+  <id>{{ site.url | append: site.baseurl | xml_escape }}/</id>
+    <title>{{ site.name | xml_escape }}</title>
+    <subtitle>{{ site.description | xml_escape }}</subtitle>
+    <author>
+        <name>{{ site.author.name | xml_escape }}</name>
+        <email>{{ site.author.email | xml_escape }}</email>
+        <uri>{{ site.author.uri | xml_escape }}</uri>
+    </author>
+  {% for post in site.posts limit: 10 %}
+    <entry>
+      <title>{{ post.title | markdownify | strip_html | strip_newlines | xml_escape }}</title>
+      <link href="{{ post.url | prepend: site.url | append: site.baseurl }}" rel="alternate" type="text/html" title="{{ post.title | xml_escape }}" />
+      <published>{{ post.date | date_to_xmlschema }}</published>
+     {% if post.last_modified_at %}<updated>{{ post.last_modified_at | date_to_xmlschema }}</updated>{% else %} <updated>{{ post.date | date_to_xmlschema }}</updated>{% endif %}
+      <id>{{ post.id | prepend: site.url | append: site.baseurl | xml_escape }}</id>
+      <content type="html" xml:base="{{ post.url | prepend: site.url | append: site.baseurl | xml_escape }}">{{ post.content | markdownify | xml_escape }}</content>
+      {% if post.author %}
+        <author>
+          {% if post.author.name %}
+            <name>{{ post.author.name | xml_escape }}</name>
+          {% else %}
+            <name>{{ post.author | xml_escape }}</name>
+          {% endif %}
+          {% if post.author.email %}
+            <email>{{ post.author.email | xml_escape }}</email>
+          {% endif %}
+          {% if post.author.uri %}
+            <uri>{{ post.author.uri | xml_escape }}</uri>
+          {% endif %}
+        </author>
+      {% endif %}
+      {% if post.category %}
+        <category term="{{ post.category | xml_escape }}" />
+      {% endif %}
+      {% for tag in post.tags %}
+        <category term="{{ tag | xml_escape }}" />
+      {% endfor %}
+      {% if post.excerpt and post.excerpt != blank %}
+        <summary>{{ post.excerpt | markdownify | strip_html | strip_newlines | xml_escape }}</summary>
+      {% endif %}
+    </entry>
+  {% endfor %}
+</feed>