1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

proper atom feed

This commit is contained in:
Matthias Kretschmann 2015-04-27 22:36:37 +02:00
parent 8b6e97f820
commit 825e9c3c59
2 changed files with 14 additions and 15 deletions

View File

@ -68,7 +68,8 @@
<!-- Canonical URL --> <!-- Canonical URL -->
<link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}"> <link rel="canonical" href="{{ site.url}}{{ page.url | replace:'index.html','' }}">
<link rel="alternate" href="{{ site.url }}/feed/" type="application/rss+xml" title="Posts Feed"/> <!-- Atom feed -->
<link rel="alternate" type="application/atom+xml" title="kremalicious posts feed" href="{{ site.url }}/feed/" />
<!-- Apple --> <!-- Apple -->
<meta name="apple-mobile-web-app-title" content="kremalicious"> <meta name="apple-mobile-web-app-title" content="kremalicious">

View File

@ -6,49 +6,47 @@ redirect_from:
--- ---
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"> <feed xmlns="http://www.w3.org/2005/Atom">
<title type="text" xml:lang="en">{{ site.name }}</title> <title type="text" xml:lang="en">{{ site.name }}</title>
<link type="application/atom+xml" href="{{ site.url }}/feed/" rel="self"/> <link type="application/atom+xml" href="{{ site.url }}/feed/" rel="self"/>
<link type="text" href="{{ site.url }}" rel="alternate"/> <link href="{{ site.url }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated> <updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id> <id>{{ site.url }}</id>
<author> <author>
<name>{{ site.author }}</name> <name>{{ site.author }}</name>
<email>{{ site.email }}</email>
</author> </author>
{% for post in site.posts limit:100 %} {% for post in site.posts limit:100 %}
<entry> <entry>
{% if post.layout == "link" %} {% if post.layout == "link" %}
<title>{{ post.title | escape | titlecase }} &#8594;</title> <title>{{ post.title | escape | titlecase }} &#8594;</title>
<link>{{ post.linkurl | escape }}</link> <link rel="alternate" type="text/html" href="{{ post.linkurl | escape }}" />
{% else %} {% else %}
<title>{{ post.title | escape | titlecase }}</title> <title>{{ post.title | escape | titlecase }}</title>
<link>{{ site.url }}{{ post.url | escape }}</link> <link rel="alternate" type="text/html" href="{{ site.url }}{{ post.url | escape }}" />
{% endif %} {% endif %}
<published>{{ post.date | date_to_xmlschema }}</published> <published>{{ post.date | date_to_xmlschema }}</published>
{% if post.updated %} {% if post.updated %}
<updated>{{ post.updated | date_to_xmlschema }}</updated> <updated>{{ post.updated | date_to_xmlschema }}</updated>
{% else %} {% else %}
<updated>{{ post.date | date_to_xmlschema }}</updated> <updated>{{ post.date | date_to_xmlschema }}</updated>
{% endif %} {% endif %}
<id>{{ site.url }}{{ post.url | escape }}</id> <id>{{ site.url }}{{ post.url | escape }}</id>
<content type="html"> <content type="html">
{% if post.image %} {% if post.image %}
&lt;img src=&quot;{{ site.url }}/media/{{ post.image }}&quot; /&gt; &lt;img src=&quot;{{ site.url }}/media/{{ post.image }}&quot; /&gt;
{% endif %} {% endif %}
{{ post.content | xml_escape }} {{ post.content | xml_escape }}
{% if post.layout == "link" %} {% if post.layout == "link" %}
&lt;a href=&quot;{{ post.linkurl | escape }}&quot;&gt;Go to source &amp;#187;&lt;/a&gt; &lt;br /&gt; &lt;a href=&quot;{{ post.linkurl | escape }}&quot;&gt;Go to source &amp;#187;&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;{{ site.url }}{{ post.url | escape }}&quot; title=&quot;Permalink for this post&quot;&gt;&amp;#8734;&lt;/a&gt; &lt;a href=&quot;{{ site.url }}{{ post.url | escape }}&quot; title=&quot;Permalink for this post&quot;&gt;&amp;#8734;&lt;/a&gt;
{% endif %} {% endif %}
&lt;hr /&gt;
You should &lt;a href=&quot;https://twitter.com/kremalicious&quot;&gt;follow me on Twitter.&lt;/a&gt;
</content> </content>
</entry> </entry>
{% endfor %} {% endfor %}