-
Notifications
You must be signed in to change notification settings - Fork 9
/
posts.json
33 lines (33 loc) · 1.14 KB
/
posts.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
---
[
{% assign counter = 0 -%}
{%- for post in site.posts limit:1000 -%}
{%- if post.draft or counter >= 1000 -%}
{%- assign match = false -%}
{%- else -%}
{%- assign match = true -%}
{%- assign counter = counter | plus:1 -%}
{%- endif -%}
{%- if match -%}
{%- if counter > 1 %},
{% endif %}{
"url": "{{site.url}}{{post.url}}",
"slug": "{{post.url | slice: 1,1000000 }}",
"title": {{post.title | strip_html | jsonify}},
"author_slug": {{post.author_slug | strip_html | jsonify}},
"current_lang": {{post.lang | strip_html | jsonify}},
"lang_fr": {{post.fr | strip_html | jsonify}},
"lang_nl": {{post.nl | strip_html | jsonify}},
"lang_en": {{post.en | strip_html | jsonify}},
"image": {{post.image | jsonify}},
"image_no_text": {{post.image_no_text | jsonify}},
"excerpt": {{post.excerpt | strip_html | jsonify}},
"created": "{{post.date | date_to_xmlschema }}",
"created_at": "{{post.date | date_to_xmlschema }}",
"last_modified_at": "{{post.last_modified_at | date_to_xmlschema }}",
"content": {{post.content | jsonify }}
}
{%- endif -%}
{%- endfor %}
]