Skip to content

Commit

Permalink
Update api to output valid json instead of jsonified html
Browse files Browse the repository at this point in the history
  • Loading branch information
makermelissa committed Dec 8, 2023
1 parent e76bcea commit c9834d4
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions api/boards.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
]

0 comments on commit c9834d4

Please sign in to comment.