-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.json
28 lines (28 loc) · 1012 Bytes
/
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
---
---
[
{% assign posts = site.documents
| where_exp:"item", "item.title != 'Search'"
| where_exp:"item", "item.title != 'Feed'"
| where_exp:"item", "item.title != null"
| where_exp:"item", "item.layout != 'auto-generated'"
| reverse %}
{% for post in posts %}
{% assign collection = site.collections | where:"label", post.collection | first %}
{
"title" : {{ post.title | jsonify }},
"categories" : [{% for c in post.categories %}"{{ c }}",{% endfor %} null],
"tags" : [{% for tag in post.tags %}"{{ tag }}",{% endfor %} null],
"href" : "{{ post.url }}",
"layout" : "{{post.layout}}",
"post.collection" : "{{ post.collection }}",
"collection" : "{{ collection.title }}",
"date" : {
"day" : "{{ post.date | date: "%d" }}",
"month" : "{{ post.date | date: "%B" }}",
"year" : "{{ post.date | date: "%Y" }}"
},
"content" : {{ post.content | markdownify | strip_html | jsonify }}
}, {% endfor %}
null
]