Skip to content

Commit a2ebb3f

Browse files
committed
RSS: add feed for security and release announcements
1 parent bd144e6 commit a2ebb3f

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

_posts/en/pages/2016-03-21-rss.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ type: pages
66
layout: page
77
lang: en
88
share: false
9-
version: 1
9+
version: 2
1010
---
1111
<p>
12+
<a href="https://bitcoincore.org/en/announcements.xml" title="Bitcoin Core Announcements RSS Feed"><img src="/assets/images/rss-24x24.png" alt="Bitcoin Core Announcments RSS Feed"></a>
13+
Security announcements and release announcements feed (English-only)
14+
</p>
15+
<p>
1216
<a href="https://bitcoincore.org/{{ page.lang }}/rss.xml" title="Bitcoin Core Blog RSS Feed"><img src="/assets/images/rss-24x24.png" alt="Bitcoin Core Blog RSS Feed"></a>
1317
Blog posts feed
1418
</p>

en/announcements.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
layout: null
3+
lang: en
4+
---
5+
<?xml version="1.0" encoding="UTF-8"?>
6+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
7+
<channel>
8+
<title>{{ site.title }}</title>
9+
<description>{{ site.translations[page.lang].description }}</description>
10+
<link>{{ site.url }}</link>
11+
<atom:link href="{{ site.url }}/{{ page.lang }}/announcements.xml" rel="self" type="application/rss+xml" />
12+
{% assign posts=site.posts | where:"lang", page.lang | where:"type", 'posts' | where: "announcement", 1 %}
13+
{% for post in posts limit:5 %}
14+
<item>
15+
<title>{{ post.title | strip_html }}</title>
16+
<description>{{ post.content | xml_escape | replace: "[[", " (" | replace: "]]", ")"}}</description>
17+
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
18+
<link>{{ site.url }}{{ post.url }}</link>
19+
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
20+
</item>
21+
{% endfor %}
22+
</channel>
23+
</rss>

0 commit comments

Comments
 (0)