diff options
| author | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-23 15:00:59 +0100 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-23 15:20:08 +0100 |
| commit | c89d8883db2d39f4a4645c577023501cf94fdbed (patch) | |
| tree | b6a617ff58d6d310a12e89f33a6bad6a801d7a79 | |
| parent | 9730c7e0de5c7eca4c55278302f42d6a9e291983 (diff) | |
| download | wiki-c89d8883db2d39f4a4645c577023501cf94fdbed.tar.gz wiki-c89d8883db2d39f4a4645c577023501cf94fdbed.tar.bz2 wiki-c89d8883db2d39f4a4645c577023501cf94fdbed.zip | |
fixed search
| -rw-r--r-- | searchdata.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/searchdata.js b/searchdata.js index 6234099..7c46fed 100644 --- a/searchdata.js +++ b/searchdata.js @@ -2,7 +2,7 @@ layout: null is_wiki_page: false --- - +{% if site.search_engine == "js" %} var jsondata=[ {% for post in site.posts %} { @@ -11,19 +11,20 @@ var jsondata=[ "tags" : "{{ post.tags | join: ', ' }}", "url" : "{{ site.baseurl }}{{ post.url }}", "date" : "{{ post.date }}", - "content" : "{{ post.content | strip_html | strip_newlines }}" + "content" : "{{ post.content | strip_html | strip_newlines | remove: '"' }}" } {% unless forloop.last %},{% endunless %} {% endfor %} , - {% for page in site.pages %} + {% for page in site.html_pages %} { - {% if page.title != nil %} - "title" : "{{ page.title | escape }}", + {% assign title = page.title | default: page.name %} + {% if title != nil %} + "title" : "{{ title | escape }}", "category" : "{{ page.category }}", "tags" : "{{ page.tags | join: ', ' }}", "url" : "{{ site.baseurl }}{{ page.url }}", "date" : "{{ page.date }}", - "content" : "{{ page.content | strip_html | strip_newlines }}" + "content" : "{{ page.content | strip_html | strip_newlines | remove: '"' }}" {% endif %} } {% unless forloop.last %},{% endunless %} {% endfor %} @@ -39,4 +40,5 @@ var sjs = SimpleJekyllSearch({ fuzzy: false, exclude: [] }) +{% endif %} |
