Merge pull request #440 from makermelissa/rss

Created RSS feed
This commit is contained in:
Scott Shawcroft 2020-04-01 14:11:06 -07:00 committed by GitHub
commit aa9b2908d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

6
_layouts/rss.html Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
{{ content }}
</channel>
</rss>

35
feed.html Normal file
View file

@ -0,0 +1,35 @@
---
layout: rss
title: RSS
permalink: /feed.rss
---
<title>CircuitPython.org Boards</title>
<link>{{ "/" | absolute_url }}</link>
<description>A list of CircuitPython and Blinka supported boards</description>
<lastBuildDate>{{ "now" | date_to_rfc822 }}</lastBuildDate>
{% for board in site.board %}
{%- if board.downloads_display == false -%}
{%- continue -%}
{%- endif -%}
{%- if board.board_id != 'unknown' -%}
<item>
<title>{{ board.name }}</title>
<link>{{ board.url | absolute_url }}</link>
<description><![CDATA[ <p>By {{ board.manufacturer }}</p> {{ board.content }} ]]></description>
<category>CircuitPython</category>
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
<guid>{{ board.url | absolute_url }}</guid>
</item>
{%- endif -%}
{% endfor %}
{% for board in site.blinka %}
<item>
<title>{{ board.name }}</title>
<link>{{ board.url | absolute_url }}</link>
<description><![CDATA[ <p>By {{ board.manufacturer }}</p> {{ board.content }} ]]></description>
<category>Blinka</category>
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
<guid>{{ board.url | absolute_url }}</guid>
</item>
{% endfor %}