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

Skip t 8000 o content

Commit 2ea97d0

Browse files
committed
Unify & sort feed by date added
1 parent f86710c commit 2ea97d0

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

feed.html

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +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-
{% for board in site.board %}
11+
{% assign all_boards = site.board | concat: site.blinka | sort: "date_added" | reverse %}
12+
{% for board in all_boards %}
1213
{%- if board.downloads_display == false -%}
1314
{%- continue -%}
1415
{%- endif -%}
@@ -17,19 +18,13 @@
1718
<title>{{ board.name }}</title>
1819
<link>{{ board.url | absolute_url }}</link>
1920
<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 %}
2024
<category>CircuitPython</category>
21-
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
25+
{% endif %}
26+
<pubDate>{{ board.date_added | date_to_rfc822 }}</pubDate>
2227
<guid>{{ board.url | absolute_url }}</guid>
2328
</item>
2429
{%- endif -%}
2530
{% endfor %}
26-
{% for board in site.blinka %}
27-
<item>
28-
<title>{{ board.name }}</title>
29-
<link>{{ board.url | absolute_url }}</link>
30-
<description><![CDATA[ {% include downloads/board_image.html board_image=board.board_image %}<p>By {{ board.manufacturer }}</p> {{ board.content }} ]]></description>
31-
<category>Blinka</category>
32-
<pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
33-
<guid>{{ board.url | absolute_url }}</guid>
34-
</item>
35-
{% endfor %}

0 commit comments

Comments
 (0)
0