Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add support for RSS feed.

add link tag in page header, to support subuscribe rss/atom feed in browsers.
  • Loading branch information...
commit afec1ee1d2b0664ae139999d5254f19a14d93d71 1 parent 4d45997
@Lax Lax authored plusjade committed
View
2  _config.yml
@@ -73,6 +73,8 @@ JB :
archive_path: /archive.html
categories_path : /categories.html
tags_path : /tags.html
+ atom_path : /atom.xml
+ rss_path : /rss.xml
# Settings for comments helper
# Set 'provider' to the comment provider you want to use.
View
5 _includes/themes/twitter/default.html
@@ -25,6 +25,11 @@
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
-->
+
+ <!-- atom & rss feed -->
+ <link href="{{ BASE_PATH }}{{ site.JB.atom_path }}" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed">
+ <link href="{{ BASE_PATH }}{{ site.JB.rss_path }}" type="application/rss+xml" rel="alternate" title="Sitewide RSS Feed">
+
</head>
<body>
View
2  atom.xml
@@ -6,7 +6,7 @@ title : Atom Feed
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
- <link href="{{ site.production_url }}/atom.xml" rel="self"/>
+ <link href="{{ site.production_url }}/{{ site.atom_path }}" rel="self"/>
<link href="{{ site.production_url }}"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.production_url }}</id>
View
28 rss.xml
@@ -0,0 +1,28 @@
+---
+layout: nil
+title : RSS Feed
+---
+
+<?xml version="1.0" encoding="UTF-8" ?>
+<rss version="2.0">
+<channel>
+ <title>{{ site.title }}</title>
+ <description>{{ site.title }} - {{ site.author.name }}</description>
+ <link>{{ site.production_url }}{{ site.rss_path }}</link>
+ <link>{{ site.production_url }}</link>
+ <lastBuildDate>{{ site.time | date_to_xmlschema }}</lastBuildDate>
+ <pubDate>{{ site.time | date_to_xmlschema }}</pubDate>
+ <ttl>1800</ttl>
+
+{% for post in site.posts %}
+ <item>
+ <title>{{ post.title }}</title>
+ <description>{{ post.content | xml_escape }}</description>
+ <link>{{ site.production_url }}{{ post.url }}</link>
+ <guid>{{ site.production_url }}{{ post.id }}</guid>
+ <pubDate>{{ post.date | date_to_xmlschema }}</pubDate>
+ </item>
+{% endfor %}
+
+</channel>
+</rss>
Please sign in to comment.
Something went wrong with that request. Please try again.