Skip to content

Commit d008895

Browse files
committed
Merge pull request #321 from jeantil/master
Add an RSS feed for the blog
2 parents a068c57 + 4c9e7f2 commit d008895

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

_layouts/blog.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
---
55

66
{% include headertop.html %}
7+
<link href="/feed/blog.xml" rel="alternate" type="application/rss+xml" title="Scala-lang's blog" />
78
{% include headerbottom.html %}
89

910
<div class="darkstrip"></div>

feed/blog.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: nil
3+
---
4+
<?xml version="1.0" encoding="utf-8"?>
5+
<feed xmlns="http://www.w3.org/2005/Atom">
6+
<title type="text" xml:lang="en">{{ site.root_desc }}</title>
7+
<link type="application/atom+xml" href="http://www.scala-lang.org/feed/blog.xml" rel="self"/>
8+
<link type="text" href="http://www.scala-lang.org/" rel="alternate"/>
9+
<updated>{{ site.time | date_to_xmlschema }}</updated>
10+
<id>http://www.scala-lang.org/</id>
11+
<author>
12+
<name>École Polytechnique Fédérale de Lausanne</name>
13+
</author>
14+
<rights>Copyright (c) 2002-{{ site.time | date:"%Y" }} École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland</rights>
15+
16+
{% for post in site.categories.blog limit:20 %}
17+
<entry>
18+
<title>{{ post.title }}</title>
19+
<link href="http://www.scala-lang.org{{ post.url }}"/>
20+
<updated>{{ post.date | date_to_xmlschema }}</updated>
21+
<id>http://www.scala-lang.org{{ post.id }}</id>
22+
<content type="html">{{ post.content | xml_escape }}</content>
23+
</entry>
24+
{% endfor %}
25+
</feed>

0 commit comments

Comments
 (0)