Skip to content

Commit

Permalink
Moved from Atom to RSS2.0 feed
Browse files Browse the repository at this point in the history
Mostly this change is so the URL can be pretty, now it'll display at
http://yoursite.com/feed and will work when minifying the site compared
to when it was at /feed/.
  • Loading branch information
sondr3 committed Feb 10, 2015
1 parent 953a8be commit a982277
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 42 deletions.
2 changes: 1 addition & 1 deletion app/templates/app/_includes/head.html
Expand Up @@ -17,5 +17,5 @@
<link rel="shortcut icon" href="/assets/favicon.ico">

<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} RSS" href="/feed/">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }} RSS" href="/feed">
</head>
40 changes: 0 additions & 40 deletions app/templates/app/atom.xml

This file was deleted.

33 changes: 33 additions & 0 deletions app/templates/app/feed.xml
@@ -0,0 +1,33 @@
---
layout: null
regenerate: true
permalink: /feed
---
<?xml version="1.0" encoding="UTF-8"?>
<rss
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title><![CDATA[{{ site.title }}]]></title>
<description><![CDATA[{{ site.description }}]]></description>
<link>{{ site.url }}</link>
<generator>Jekyll</generator>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<atom:link href="{{ site.url }}/feed/" rel="self" type="application/rss+xml"/>
{% for post in site.posts limit:10 %}
<item>
<title><![CDATA[{{ post.title }}]]></title>
{% if post.excerpt %}
<description><![CDATA[{{ post.excerpt }}]]></description>
{% else %}
<description><![CDATA[{{ post.content }}]]></description>
{% endif %}
<dc:creator><![CDATA[{{ site.author.name }}]]></dc:creator>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>
2 changes: 1 addition & 1 deletion app/templates/app/index.html
Expand Up @@ -17,5 +17,5 @@ <h2>
{% endfor %}
</ul>

<p class="rss-subscribe">subscribe <a href="{{ "/feed/" }}">via RSS</a></p>
<p class="rss-subscribe">subscribe <a href="{{ "/feed" }}">via RSS</a></p>
</div>

0 comments on commit a982277

Please sign in to comment.