Add "Network status and alerts" page and RSS feed (fixes #170)

Generate alerts pages through alerts.rb plugin
Allow to keep short alias urls for each alert
Move alert pages in _alerts
Update sitemap plugin to include alerts
This commit is contained in:
Saivann 2013-06-18 23:50:37 -04:00
parent cd597fdb21
commit ec44853934
18 changed files with 385 additions and 54 deletions

31
en/alerts.html Normal file
View file

@ -0,0 +1,31 @@
---
layout: base
lang: en
id: alerts
title: Network status and alerts - Bitcoin
---
<link rel="alternate" type="application/rss+xml" href="/en/rss/alerts.rss" title="Bitcoin network status and alerts">
<div class="versiontext">
<h1>Network status and alerts<a type="application/rss+xml" href="/en/rss/alerts.rss"><img src="/img/icon_rss.svg" alt="rss" class="rssicon"></a></h1>
{% assign active = false %}{% catpage_for p in site.pages reversed sort_by:date category:alert %}{% if p.active == true %}{% assign active = true %}{% endif %}{% endcatpage_for %}
{% if active == false %}
<div class="alertstatusinactive">There is no ongoing event on the Bitcoin network.</div>
{% else %}
<div class="alertstatusactive"">The following network event is ongoing.</div>
<ul class="alertsactive">
{% catpage_for p in site.pages reversed sort_by:date category:alert %}{% if p.active == true %}
<li>
{{ p.date | date:"%Y-%m-%d" }} - <a href="{{ p.url | replace:'.html','' }}">{{ p.title }}</a>
</li>
{% endif %}{% endcatpage_for %}
</ul>
{% endif %}
<ul class="alertsinactive">
{% catpage_for p in site.pages reversed sort_by:date category:alert %}{% if p.active == false %}
<li>
{{ p.date | date:"%Y-%m-%d" }} - <a href="{{ p.url | replace:'.html','' }}">{{ p.title }}</a>
</li>
{% endif %}{% endcatpage_for %}
</ul>
<p>See the complete <a href="https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures">CVE list</a>.</p>
</div>

21
en/rss/alerts.rss Normal file
View file

@ -0,0 +1,21 @@
---
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Bitcoin network status and alerts</title>
<link>http://bitcoin.org/en/alerts</link>
<description>This RSS feed allows to follow events and alerts surrounding the Bitcoin network and software.</description>
<image>
<url>http://bitcoin.org/img/logo_rss.png</url>
<link>http://bitcoin.org/en/alerts</link>
</image>
{% catpage_for p in site.pages reversed sort_by:date category:alert %}
<item>
<title>{{ p.title }}</title>
<link>http://bitcoin.org{{ p.url | replace:'.html','' }}</link>
<pubDate>{{ p.date | date: "%a, %d %b %Y" }}</pubDate>
</item>
{% endcatpage_for %}
</channel>
</rss>