From b5d6f4dfabd6ec950c909a240adeed491cddf347 Mon Sep 17 00:00:00 2001 From: Paul Shen Date: Mon, 3 Jun 2013 11:02:14 -0700 Subject: [PATCH 1/3] [docs] Add RSS feed.xml for blog posts uses `feed.xml` from https://github.com/snaptortoise/jekyll-rss-feeds (slightly modified for `site.url` + `site.baseurl`) --- _config.yml | 2 ++ _layouts/default.html | 1 + feed.xml | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 feed.xml diff --git a/_config.yml b/_config.yml index 2bd9d949..d0dfeb8f 100644 --- a/_config.yml +++ b/_config.yml @@ -1,6 +1,7 @@ --- markdown: redcarpet name: React +description: A JavaScript library for building user interfaces redcarpet: extensions: - fenced_code_blocks @@ -11,4 +12,5 @@ exclude: - Gemfile.lock - README.md - Rakefile +url: http://facebook.github.io baseurl: /react diff --git a/_layouts/default.html b/_layouts/default.html index d12322c3..51840c3e 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -12,6 +12,7 @@ + diff --git a/feed.xml b/feed.xml new file mode 100644 index 00000000..4ee7dd46 --- /dev/null +++ b/feed.xml @@ -0,0 +1,21 @@ +--- +layout: none +--- + + + + {{ site.name }} + {{ site.description }} + {{ site.url }}{{ site.baseurl }} + + {% for post in site.posts limit:10 %} + + {{ post.title }} + {{ post.content | xml_escape }} + {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} + {{ site.url }}{{ site.baseurl }}{{ post.url }} + {{ site.url }}{{ site.baseurl }}{{ post.url }} + + {% endfor %} + + From 6912393c9219f08942e8e0cf2d33bc1c58c7884d Mon Sep 17 00:00:00 2001 From: Paul Shen Date: Mon, 3 Jun 2013 11:34:42 -0700 Subject: [PATCH 2/3] [docs] Use date_to_xmlschema in feed.xml --- feed.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feed.xml b/feed.xml index 4ee7dd46..9689eaf7 100644 --- a/feed.xml +++ b/feed.xml @@ -12,7 +12,7 @@ layout: none {{ post.title }} {{ post.content | xml_escape }} - {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} + {{ post.date | date_to_xmlschema }} {{ site.url }}{{ site.baseurl }}{{ post.url }} {{ site.url }}{{ site.baseurl }}{{ post.url }} From 652ec03185156c7af0c13a6a8ff9c14609668d93 Mon Sep 17 00:00:00 2001 From: Paul Shen Date: Mon, 3 Jun 2013 11:36:04 -0700 Subject: [PATCH 3/3] [docs] RSS: Pass title through xml_escape --- feed.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feed.xml b/feed.xml index 9689eaf7..ddd764e3 100644 --- a/feed.xml +++ b/feed.xml @@ -10,7 +10,7 @@ layout: none {% for post in site.posts limit:10 %} - {{ post.title }} + {{ post.title | xml_escape }} {{ post.content | xml_escape }} {{ post.date | date_to_xmlschema }} {{ site.url }}{{ site.baseurl }}{{ post.url }}