Skip to content

Commit 39d03a5

Browse files
committed
Added rss template.
1 parent d4c61d1 commit 39d03a5

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

_layouts/site.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: BitThunder Website and Blog
3+
description: Latest information on the open-source BitThunder project.
4+
---
5+
{{ content }}

blog/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: posts
3-
title: BitThunder Blog
3+
title: Blog
44
permalink: /blog/home/
55
---
66

@@ -13,3 +13,4 @@ permalink: /blog/home/
1313
{% endfor %}
1414
</ul>
1515

16+
<a href="{{ site.url }}/blog/rss.xml">Subscribe with RSS</a>

blog/rss.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: site
3+
---
4+
<?xml version="1.0"?>
5+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6+
  <channel>
7+
    <title>BitThunder Blog</title>
8+
    <link>{{ site.url }}</link>
9+
    <atom:link href="{{ site.url }}blog/rss.xml" rel="self" type="application/rss+xml" />
10+
    <description>{{ site.description }}</description>
11+
    <language>en-gb</language>
12+
    <pubDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
13+
    <lastBuildDate>{{ site.time | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
14+
 
15+
    {% for post in site.posts %}
16+
    <item>
17+
      <title>{{ post.title }}</title>
18+
      <link>{{ site.url }}{{ post.url }}</link>
19+
      <pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
20+
      <author>{{ post.author }}</author>
21+
      <guid>{{ site.url }}{{ post.id }}</guid>
22+
      <description>{{ post.content | xml_escape }}</description>
23+
    </item>
24+
    {% endfor %}
25+
 
26+
  </channel>
27+
</rss>

0 commit comments

Comments
 (0)