From c8f60a4f4c8fab99eda2c3c8df3f655e3ba072f1 Mon Sep 17 00:00:00 2001 From: davidtsadler Date: Sun, 1 Jan 2012 21:16:29 +0000 Subject: Add RSS feed. --- _config.yml.example | 14 ++++++++++++-- _site_build/_includes/footer.html | 2 +- _site_build/_includes/head.html | 2 ++ _site_build/rss.xml | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 _site_build/rss.xml diff --git a/_config.yml.example b/_config.yml.example index 75621c6..51fcf2e 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -2,6 +2,9 @@ # SITE CONFIG # *************************** +# Full url for the site minus the ending forward slash. +url: + # Appears in the and <header> elements within the site. title: @@ -10,12 +13,16 @@ title: # Used in various places where the author of the site needs to appear. # For example, the copyright notice. +# Also appears in the RSS feed. author: +# Used in the meta description tag of the site and the description element of the RSS feed. +description: + # Optional information that appears in the 'Contact' sidebar. # Mainly used to generate URLs to various social sites. -# email address of the site author. +# email address of the site author. Also appears in the RSS feed if specified. #email: # Twitter name minus the @ character. @@ -24,9 +31,12 @@ author: # Git hub name. #github: -# Controls the number of recent posts shown on the main index page. +# Controls the number of recent posts shown on the main index page and in the RSS feed. max_recent_posts: 10 +# Used in the footer of the site and RSS feed. +copyright_year: + # Optional Google analytics. #google_ua: diff --git a/_site_build/_includes/footer.html b/_site_build/_includes/footer.html index 70bd3c5..b165e1d 100644 --- a/_site_build/_includes/footer.html +++ b/_site_build/_includes/footer.html @@ -1,5 +1,5 @@ <footer> <p> - <small>Copyright © 2011 by {{ site.author }}. All Rights Reserved.</small> + <small>Copyright © {{ site.copyright_year }} by {{ site.author }}. All Rights Reserved.</small> </p> </footer> diff --git a/_site_build/_includes/head.html b/_site_build/_includes/head.html index 54d16d0..d83eb39 100644 --- a/_site_build/_includes/head.html +++ b/_site_build/_includes/head.html @@ -1,5 +1,7 @@ <meta charset="utf-8"> <title>{{ page.title }} - {{ site.title }} + + diff --git a/_site_build/rss.xml b/_site_build/rss.xml new file mode 100644 index 0000000..e5ef11f --- /dev/null +++ b/_site_build/rss.xml @@ -0,0 +1,32 @@ +--- +layout: nil +--- + + + + {{ site.title }} + {{ site.url }} + + {{ site.description }} + Copyright {{ site.copyright_year }} by {{ site.author }}. All Rights Reserved. + {% if site.email %} + {{ site.email }} ({{ site.author }}) + {{ site.email }} ({{ site.author }}) + {% endif %} + {{ site.time | date: "%a, %d %b %Y %H:%M:%S %z"}} + {{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }} + 1440 + {% for post in site.posts limit:site.max_recent_posts %} + + {{ post.title }} + {{ site.url }}{{ post.url }} + {{ site.url}}{{ post.url}} + {{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }} + {% if site.email %} + {{ site.email }} ({{ site.author }}) + {% endif %} + {{ post.content | text_excerpt | xml_escape }} + + {% endfor %} + + -- cgit v1.2.3-13-gbd6f