8000 Unify & sort feed by date added · adafruit/circuitpython-org@f84a859 · GitHub
[go: up one dir, main page]

Skip to content

Commit f84a859

Browse files
committed
Unify & sort feed by date added
1 parent d3160e5 commit f84a859

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

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_to_rfc822 }}</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)
0