forked from ArctosDB/documentation-wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
38 lines (38 loc) · 1.18 KB
/
search.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
---
layout: null
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | join: ', ' }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date }}",
"content" : {{ post.content | strip_html | strip_newlines | escape | jsonify }}
} {% unless forloop.last %},{% endunless %}
{% endfor %}
,
{% for collection in site.collections %}
{% for doc in collection.docs %}
{
{% if doc.url contains "index.html" %}
"title" : "",
"category" : "",
"tags" : "",
"url" : "",
"date" : "",
"content" : ""
{% else %}
"title" : "{{ doc.title | escape }}",
"category" : "{{ collection.label }}",
"tags" : "",
"url" : "{{ doc.url | prepend: site.baseurl }}",
"date" : "",
"content" : {{ doc.content | strip_html | strip_newlines | escape | jsonify }}
{% endif %}
} {% unless forloop.last %},{% endunless %}
{% endfor %}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]