Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit c11293e

Browse files
committed
Port RSS/Atom feed to Jekyll
Signed-off-by: Alex Coles <[email protected]>
1 parent 2d01d61 commit c11293e

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

news.rss

+14-21
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
11
---
2-
extension: rss
32
layout: nil
4-
dirty: true
5-
filter:
6-
- erb
7-
dirty: true
83
---
9-
<?xml version="1.0" encoding="utf-8"?>
10-
<feed xmlns="http://www.w3.org/2005/Atom">
11-
4+
<?xml version="1.0" encoding="UTF-8"?>
5+
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
126
<title>Datamapper.org News and Notes</title>
137
<subtitle>Ruby Object Relational Mapper</subtitle>
8+
<id>http://www.datamapper.org</id>
9+
<generator uri="http://jekyllrb.com/" version="0.5">Jekyll</generator>
1410
<link href="http://www.datamapper.org/news.rss" rel="self"/>
1511
<link href="http://www.datamapper.org/"/>
16-
<updated><%= Time.now.xmlschema %></updated>
12+
<updated>{{ site.time | date_to_xmlschema }}</updated>
1713
<author>
1814
<name>Maintained By the Community</name>
1915
<email>[email protected]</email>
2016
</author>
21-
<id>http://www.datamapper.org</id>
22-
<% @pages.find(:limit => 10,
23-
:in_directory => 'articles',
24-
:recursive => true,
25-
:sort_by => 'created_at',
26-
:reverse => true).each do |article| %>
17+
18+
{% for post in site.posts %}
2719
<entry>
28-
<title><%= h(article.title) %></title>
29-
<link href="<%= article.url %>"/>
30-
<id>tag:datamapper.org,<%= article.created_at.strftime('%Y-%m-%d') %>:<%= article.created_at.to_i %></id>
31-
<updated><%= article.created_at.xmlschema %></updated>
32-
<content type="html"><%= h(render(article)) %></content>
20+
<title>{{ post.title }}</title>
21+
<link href="http://datamapper.org{{ post.url }}"/>
22+
<updated>{{ post.date | date_to_xmlschema }}</updated>
23+
<id>tag:datamapper.org,{{ post.date | date: "%Y-%m-%d" }}</id>
24+
<content type="html">{{ post.content | xml_escape }}</content>
3325
</entry>
34-
<% end %>
26+
{% endfor %}
27+
3528
</feed>

0 commit comments

Comments
 (0)