Skip to content

Commit

Permalink
Merge pull request facebook#49 from paulshen/jekyllrss
Browse files Browse the repository at this point in the history
[docs] Add RSS feed.xml for blog posts
  • Loading branch information
zpao committed Jun 3, 2013
2 parents b202569 + 2bb7e15 commit 4081678
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
markdown: redcarpet
name: React
description: A JavaScript library for building user interfaces
redcarpet:
extensions:
- fenced_code_blocks
Expand All @@ -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 change: 1 addition & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
21 changes: 21 additions & 0 deletions docs/feed.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 4081678

Please sign in to comment.