Skip to content

Commit c9834d4

Browse files
committed
Update api to output valid json instead of jsonified html
1 parent e76bcea commit c9834d4

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

api/boards.json

+22-2
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)