/
data.json
39 lines (37 loc) · 1.65 KB
/
data.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
34
35
36
37
38
39
---
---
{
{% for entry in site.posts %}
"{{ entry.url | slugify }}": {
"title": "{{ entry.title | xml_escape }}",
"url": "{{site.url}}{{ entry.url | xml_escape }}",
"slug": "{{ entry.url | xml_escape }}",
"summary": "{{ entry.content | strip_html | strip_newlines | truncatewords: 50 | xml_escape | json}}",
"content": "{{ entry.content | strip_html | strip_newlines | xml_escape | json}}",
{% if entry.image %}
"thumbnail": "{{ entry.image | xml_escape }}",
"image": "{{ entry.image | xml_escape }}"
{% else %}
"thumbnail": "{{ site.background | xml_escape }}",
"image": "{{ site.background | xml_escape }}"
{% endif %}
},
{% endfor %}
{% for entry in site.discover %}
"{{ entry.url | slugify }}": {
"title": "{{ entry.title | xml_escape }}",
"url": "{{site.url}}{{ entry.url | xml_escape }}",
"slug": "{{ entry.url | xml_escape }}",
"summary": "{{ entry.content | strip_html | strip_newlines | truncatewords: 50 | xml_escape | json}}",
"content": "{{ entry.content | strip_html | strip_newlines | truncatewords: 50| xml_escape | json }}",
{% if entry.image %}
"thumbnail": "{{ entry.image | xml_escape }}",
"image": "{{ entry.image | xml_escape }}"
{% else %}
"thumbnail": "{{ site.background | xml_escape }}",
"image": "{{ site.background | xml_escape }}"
{% endif %}
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
}