Add tags to posts

This commit is contained in:
Oliver Davies 2020-05-06 01:56:01 +01:00
parent 97a6de3c42
commit c38c9ad7b2

View file

@ -13,7 +13,12 @@ use: [posts]
"updated": "{{ post.date }}", "updated": "{{ post.date }}",
"path": "{{ post.url|trim('/', 'right') }}", "path": "{{ post.url|trim('/', 'right') }}",
"content": {{ post.blocks.content|json_encode|raw }}, "content": {{ post.blocks.content|json_encode|raw }},
"status": "{{ post.draft ? '0' : '1' }}" "status": "{{ post.draft ? '0' : '1' }}",
"tags": [
{% for tag in post.tags %}
"{{ tag }}"{% if not loop.last %},{% endif %}
{% endfor %}
]
}{% if not loop.last %},{% endif %} }{% if not loop.last %},{% endif %}
{% endfor %} {% endfor %}
] ]