From: XhmikosR Date: Sat, 5 Dec 2015 08:18:18 +0000 (+0200) Subject: Fix docs/search.json. X-Git-Tag: v4.0.0-alpha.2~65^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3afdbe426f7d195912777b8b55bec5db982f92e1;p=thirdparty%2Fbootstrap.git 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] --- diff --git a/docs/search.json b/docs/search.json index a31fc7334c..7cd8517bc9 100644 --- a/docs/search.json +++ b/docs/search.json @@ -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 }}", - "url" : "{{ site.baseurl }}{{ page.url }}", - "date" : "{{ page.date }}" + "title" : {{ page.title | jsonify }}, + "url" : "{{ site.baseurl }}{{ page.url }}" } {% unless forloop.last %},{% endunless %} - {% endfor %} + {% endif %} +{% endfor %} ]