-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_data.json
48 lines (42 loc) · 1.7 KB
/
search_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
40
41
42
43
44
45
46
---
layout: null
---
{
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content" : "{{post.content | strip_html | strip_newlines | xml_escape | remove: "\"}}",
"url": " {{ post.url | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"categories": "{% for category in post.categories %}{{ category }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
{% for page in site.pages %}
{% if page.title != nil %},
"{{ page.url | slugify }}": {
"title": "{{ page.title | xml_escape }}",
"subtitle": "{{ page.subtitle | xml_escape }}",
"url": " {{ page.url | xml_escape }}",
"author": "{{ page.author | xml_escape }}",
"category": "{{ page.category | xml_escape }}",
"content": "{{ page.content | strip_html | strip_newlines | xml_escape }}"
}
{% endif %}
{% endfor %}
{% for collection in site.collections %}
{% if collection.label != 'posts' %}
{% assign Collection = site.collections | where: "label", collection.label | first %}
{% for doc in Collection.docs %}
{% if doc.title != nil %},
"{{ doc.url | slugify }}": {
"title": "{{ doc.title | xml_escape }}",
"url": " {{ doc.url | xml_escape }}",
"description": "{{doc.description | xml_escape }}",
"categories": "{% for category in doc.categories %}{{ category }}{% unless forloop.last %}, {% endunless %}{% endfor %}",
"content": "{{ doc.content | strip_html | strip_newlines | xml_escape }}"
}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
}