Add rss feed (last 10 posts)

This commit is contained in:
Tyler Hallada 2014-07-29 22:40:25 -04:00
parent f8ce5f95fe
commit 06ec48434c
4 changed files with 32 additions and 0 deletions

View File

@ -1,5 +1,9 @@
name: Tyler Hallada - Blog
description: Musings on technology, literature, and interesting topics
url: http://hallada.net/blog
markdown: redcarpet
pygments: true
paginate: 10
paginate_path: "blog/page:num"
gems:
- jekyll-redirect-from

View File

@ -23,6 +23,9 @@
<!-- Web Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700' rel='stylesheet' type='text/css'>
<!-- RSS Feed -->
<link href='/feed.xml' rel='alternate' type='application/atom+xml'>
<!-- Favicon -->
<link rel="shortcut icon" href="/favicon.png" />
</head>

View File

@ -20,6 +20,9 @@
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/main.css">
<!-- RSS Feed -->
<link href='/feed.xml' rel='alternate' type='application/atom+xml'>
<!-- Web Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italics,300,300italics,200' rel='stylesheet' type='text/css'>

22
feed.xml Normal file
View File

@ -0,0 +1,22 @@
---
layout: none
redirect_from: "/rss"
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ site.name | xml_escape }}</title>
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
<link>{{ site.url }}</link>
<atom:link href="{{ site.url }}/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: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<link>{{ site.url }}{{ post.url }}</link>
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
</item>
{% endfor %}
</channel>
</rss>