From 3afdbe426f7d195912777b8b55bec5db982f92e1 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sat, 5 Dec 2015 10:18:18 +0200 Subject: [PATCH] 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] --- docs/search.json | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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 %} ]