-
Notifications
You must be signed in to change notification settings - Fork 628
Expand file tree
/
Copy pathsearch.json
More file actions
17 lines (17 loc) · 793 Bytes
/
search.json
File metadata and controls
17 lines (17 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
layout: null
---
[
{% for page in site.pages %}
{% if page.url != "/search.json" and page.url != "/404.html" %}
{
"title": "{{ page.title | default: '无标题' | escape }}",
"url": "{{ page.url | relative_url }}",
"excerpt": "{{ page.excerpt | default: page.content | strip_html | normalize_whitespace | truncatewords: 50 | escape }}",
"content": "{{ page.content | strip_html | normalize_whitespace | truncatewords: 100 | escape }}",
"category": "{{ page.path | split: '/' | first }}",
"keywords": "{{ page.title | default: '' | append: ' ' | append: page.excerpt | default: '' | append: ' ' | append: page.content | strip_html | truncatewords: 20 | escape }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}
{% endfor %}
]