-
Notifications
You must be signed in to change notification settings - Fork 15
/
search.json
35 lines (31 loc) · 956 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
29
30
31
32
33
34
35
---
title: search
layout: none
search: exclude
---
[
{% 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 }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
{% if post.title != nil %},{% endif %}
{% for page in site.pages %}
{
{% if page.title != nil %}
"title": "{{ page.title | strip_html | strip_newlines | remove_chars | escape }}",
"tags": "{{ page.tags }}",
"keywords": "{{page.keywords}}",
"url": "{{ page.url | remove: "/"}}",
"summary": "{{page.summary | strip_html | strip_newlines | remove_chars | escape }}",
"content": {{ page.content | jsonify }}
{% endif %}
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]