|
8 | 8 | <link>{{ "/" | absolute_url }}</link>
|
9 | 9 | <description>A list of CircuitPython and Blinka supported boards</description>
|
10 | 10 | <lastBuildDate>{{ "now" | date_to_rfc822 }}</lastBuildDate>
|
11 |
| -{%- comment -%} |
12 |
| - The following are boards that are in the _data/files.json build |
13 |
| - process. Seperate loops due to wanting to sort by download count first. |
14 |
| -{%- endcomment -%} |
15 |
| -{%- assign twelve_hours = 12 | times: 60 | times: 60 -%} |
16 |
| -{%- assign boards = site.data.files | sort: "downloads" | reverse -%} |
17 |
| -{%- for board in boards -%} |
18 |
| - {%- assign info = site.board | where: 'board_id', board.id -%} |
19 |
| - {%- if info.size == 0 %} |
20 |
| - {%- assign info = site.board | where: 'board_id', 'unknown' -%} |
21 |
| - {%- endif -%} |
22 |
| - {%- assign info = info[0] -%} |
23 |
| - {%- if info.downloads_display == false -%} |
| 11 | +{% for board in site.board %} |
| 12 | + {%- if board.downloads_display == false -%} |
24 | 13 | {%- continue -%}
|
25 | 14 | {%- endif -%}
|
26 |
| - <item> |
27 |
| - <title>{{ info.name | default: board.id }}</title> |
28 |
| - <link>{{ info.url | absolute_url }}</link> |
29 |
| - <description><![CDATA[ <p>By {{ info.manufacturer }}</p> {{ info.content }} ]]></description> |
30 |
| - <category>CircuitPython</category> |
31 |
| - <pubDate>{{ info.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate> |
32 |
| - <guid>{{ info.url | absolute_url }}</guid> |
33 |
| - </item> |
34 |
| -{% endfor %} |
35 |
| - |
36 |
| -{% comment %} |
37 |
| - The following are boards that are not yet in the _data/files.json build |
38 |
| - process and have no downloads. |
39 |
| -{% endcomment %} |
40 |
| -{% for board in site.board %} |
41 |
| - {% assign info = site.data.files | where: 'id', board.board_id | first %} |
42 |
| - {% if info == nil and board.board_id != 'unknown' %} |
| 15 | + {%- if board.board_id != 'unknown' -%} |
43 | 16 | <item>
|
44 | 17 | <title>{{ board.name }}</title>
|
45 | 18 | <link>{{ board.url | absolute_url }}</link>
|
|
48 | 21 | <pubDate>{{ board.date_added | date: '%s' | plus: twelve_hours | date_to_rfc822 }}</pubDate>
|
49 | 22 | <guid>{{ board.url | absolute_url }}</guid>
|
50 | 23 | </item>
|
51 |
| - {% endif %} |
| 24 | + {%- endif -%} |
52 | 25 | {% endfor %}
|
53 | 26 | {% for board in site.blinka %}
|
54 | 27 | <item>
|
|
0 commit comments