Skip to content

Commit d3945b1

Browse files
authored
Merge pull request #1300 from makermelissa/board-url-refactor
Fix board API output
2 parents 4ef6ce1 + d429143 commit d3945b1

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

_board/warmbit_bluepixel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ board_id: "warmbit_bluepixel"
44
title: "Warmbit BluePixel Download"
55
name: "Warmbit BluePixel"
66
manufacturer: "Warmbit"
7-
board_url: ""
7+
board_url:
88
board_image: "unknown.jpg"
99
date_added: 2021-9-3
1010
family: nrf52840

api/boards.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,25 @@ layout: null
33
permalink: /api/boards.json
44
excerpt: CircuitPython supported boards.
55
---
6-
7-
{{ site.board | jsonify }}
6+
[{% for board in site.board %}
7+
{
8+
"board_id": "{{ board.board_id }}",
9+
"title": {{ board.title | jsonify }},
10+
"name": {{ board.name | jsonify }},
11+
"board_url": [{% for url in board.board_url %}
12+
"{{ url }}"{% unless forloop.last %},{% endunless %}{% endfor %}
13+
],
14+
"board_image": "{{ board.board_image }}",
15+
"date_added": "{{ board.date_added }}",
16+
"family": "{{ board.family }}",
17+
"bootloader_id": "{{ board.bootloader_id }}",
18+
"tags": [{% for tag in board.tags %}
19+
"{{ tag }}"{% unless forloop.last %},{% endunless %}{% endfor %}
20+
],
21+
"features": [{% for feature in board.features %}
22+
"{{ feature }}"{% unless forloop.last %},{% endunless %}{% endfor %}
23+
],
24+
"url_path": "{{ board.url }}",
25+
"description": {{ board.content | strip_newlines | jsonify}}
26+
}{% unless forloop.last %},{% endunless %}{% endfor %}
27+
]

0 commit comments

Comments
 (0)