1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/docs/search.json
XhmikosR 3afdbe426f 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]
2015-12-05 11:30:27 +02:00

15 lines
354 B
JSON

---
# Leave it empty to compile
---
[
{% assign sorted_pages = site.html_pages | sort: 'title' %}
{% for page in sorted_pages %}
{% if page.title %}
{
"title" : {{ page.title | jsonify }},
"url" : "{{ site.baseurl }}{{ page.url }}"
} {% unless forloop.last %},{% endunless %}
{% endif %}
{% endfor %}
]