• XhmikosR's avatar
    Fix docs/search.json. · 3afdbe42
    XhmikosR authored
    * 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]
    3afdbe42
search.json 354 bytes
---
# 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 %}