Merge pull request #1300 from makermelissa/board-url-refactor
Fix board API output
This commit is contained in:
commit
d3945b17cc
2 changed files with 23 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ board_id: "warmbit_bluepixel"
|
|||
title: "Warmbit BluePixel Download"
|
||||
name: "Warmbit BluePixel"
|
||||
manufacturer: "Warmbit"
|
||||
board_url: ""
|
||||
board_url:
|
||||
board_image: "unknown.jpg"
|
||||
date_added: 2021-9-3
|
||||
family: nrf52840
|
||||
|
|
|
|||
|
|
@ -3,5 +3,25 @@ layout: null
|
|||
permalink: /api/boards.json
|
||||
excerpt: CircuitPython supported boards.
|
||||
---
|
||||
|
||||
{{ site.board | jsonify }}
|
||||
[{% for board in site.board %}
|
||||
{
|
||||
"board_id": "{{ board.board_id }}",
|
||||
"title": {{ board.title | jsonify }},
|
||||
"name": {{ board.name | jsonify }},
|
||||
"board_url": [{% for url in board.board_url %}
|
||||
"{{ url }}"{% unless forloop.last %},{% endunless %}{% endfor %}
|
||||
],
|
||||
"board_image": "{{ board.board_image }}",
|
||||
"date_added": "{{ board.date_added }}",
|
||||
"family": "{{ board.family }}",
|
||||
"bootloader_id": "{{ board.bootloader_id }}",
|
||||
"tags": [{% for tag in board.tags %}
|
||||
"{{ tag }}"{% unless forloop.last %},{% endunless %}{% endfor %}
|
||||
],
|
||||
"features": [{% for feature in board.features %}
|
||||
"{{ feature }}"{% unless forloop.last %},{% endunless %}{% endfor %}
|
||||
],
|
||||
"url_path": "{{ board.url }}",
|
||||
"description": {{ board.content | strip_newlines | jsonify}}
|
||||
}{% unless forloop.last %},{% endunless %}{% endfor %}
|
||||
]
|
||||
Loading…
Reference in a new issue