Browse Source

Merge pull request #49 from paulshen/jekyllrss

[docs] Add RSS feed.xml for blog posts
main
Paul O’Shannessy 12 years ago
parent
commit
1e47e16ef3
  1. 2
      _config.yml
  2. 1
      _layouts/default.html
  3. 21
      feed.xml

2
_config.yml

@ -1,6 +1,7 @@
---
markdown: redcarpet
name: React
description: A JavaScript library for building user interfaces
redcarpet:
extensions:
- fenced_code_blocks
@ -11,5 +12,6 @@ exclude:
- Gemfile.lock
- README.md
- Rakefile
url: http://facebook.github.io
baseurl: /react
permalink: /blog/:year/:month/:day/:title.html

1
_layouts/default.html

@ -12,6 +12,7 @@
<meta property="og:description" content="A JavaScript library for building user interfaces" />
<link rel="shortcut icon" href="/react/favicon.ico">
<link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}{{ site.baseurl }}/feed.xml">
<link rel="stylesheet" href="/react/css/react.css">
<link rel="stylesheet" href="/react/css/syntax.css">

21
feed.xml

@ -0,0 +1,21 @@
---
layout: none
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name }}</title>
<description>{{ site.description }}</description>
<link>{{ site.url }}{{ site.baseurl }}</link>
<atom:link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self" type="application/rss+xml" />
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date_to_xmlschema }}</pubDate>
<link>{{ site.url }}{{ site.baseurl }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ site.baseurl }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>
Loading…
Cancel
Save