Fix docs/search.json.
* only loop through `html_pages` * skip pages without a title * stop double escaping the title; use Jekyll's `jsonify` filter to output valid JSON * remove `date` since we don't use it [skip sauce]
This commit is contained in:
parent
4e7c7f4b9d
commit
3afdbe426f
|
@ -3,11 +3,13 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
[
|
[
|
||||||
{% for page in site.pages %}
|
{% assign sorted_pages = site.html_pages | sort: 'title' %}
|
||||||
|
{% for page in sorted_pages %}
|
||||||
|
{% if page.title %}
|
||||||
{
|
{
|
||||||
"title" : "{{ page.title | escape }}",
|
"title" : {{ page.title | jsonify }},
|
||||||
"url" : "{{ site.baseurl }}{{ page.url }}",
|
"url" : "{{ site.baseurl }}{{ page.url }}"
|
||||||
"date" : "{{ page.date }}"
|
|
||||||
} {% unless forloop.last %},{% endunless %}
|
} {% unless forloop.last %},{% endunless %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue