Github Pages + Popolo

One of the oddities of Github Pages is that they can natively deal with JSON data files … as long as you pretend that they’re YAML files!

So, if drop my Eduskunta-Popolo parties.json file into the _data directory, it won’t work. But if I simply rename it as parties.yaml it will suddenly become available in templates correctly:

layout: default

{% for party in %}
<li> {{ }} </li>
{% endfor %}

Leave a Reply

Your email address will not be published. Required fields are marked *