Skip to content

Commit 17cbd02

Browse files
committed
Sort the feed in chronological order
.. and make sure all the times are at midnight GMT on the date the board was added. Before this, the date was printed in the generating local time zone; adding 12 hours often (but not always) made it be in the same GMT day.
1 parent 11c6f23 commit 17cbd02

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

feed.html

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<link>{{ "/" | absolute_url }}</link>
99
<description>A list of CircuitPython and Blinka supported boards</description>
1010
<lastBuildDate>{{ "now" | date_to_rfc822 }}</lastBuildDate>
11-
{% assign chronological_boards = site.board | sort: "date_added" %}
12-
{% for board in chronological_boards reversed %}
11+
{% assign all_boards = site.board | concat: site.blinka | sort: "date_added" | reverse %}
12+
{% for board in all_boards %}
1313
{%- if board.downloads_display == false -%}
1414
{%- continue -%}
1515
{%- endif -%}
@@ -18,20 +18,13 @@
1818
<title>{{ board.name }}</title>
1919
<link>{{ board.url | absolute_url }}</link>
2020
<description><![CDATA[ {% include downloads/board_image.html board_image=board.board_image %}<p>By {{ board.manufacturer }}</p> {{ board.content }} ]]></description>
21+
{% if board.blinka %}
22+
<category>Blinka</category>
23+
{% else %}
2124
<category>CircuitPython</category>
22-
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
25+
{% endif %}
26+
<pubDate>{{ board.date_added | date: "%a, %d %b %Y 00:00:00 GMT" }}</pubDate>
2327
<guid>{{ board.url | absolute_url }}</guid>
2428
</item>
2529
{%- endif -%}
2630
{% endfor %}
27-
{% assign chronological_blinka_boards = site.board | sort: "date_added" %}
28-
{% for board in chronological_blinka_boards reversed %}
29-
<item>
30-
<title>{{ board.name }}</title>
31-
<link>{{ board.url | absolute_url }}</link>
32-
<description><![CDATA[ {% include downloads/board_image.html board_image=board.board_image %}<p>By {{ board.manufacturer }}</p> {{ board.content }} ]]></description>
33-
<category>Blinka</category>
34-
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
35-
<guid>{{ board.url | absolute_url }}</guid>
36-
</item>
37-
{% endfor %}

0 commit comments

Comments
 (0)