From df8d186d381557da67fe550bce1490b868932724 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Thu, 8 Aug 2019 13:15:19 +0200 Subject: Jsonify title in search as well --- assets/search-data.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'assets') diff --git a/assets/search-data.js b/assets/search-data.js index 53394e7..72075f3 100644 --- a/assets/search-data.js +++ b/assets/search-data.js @@ -1,11 +1,11 @@ (function() { const pages = [ {{ range $index, $page := .Site.Pages }} - {{- if and $index (gt $index 0) -}},{{- end }} + {{- if $index -}},{{- end }} { "idx": {{ $index }}, "href": "{{ $page.RelPermalink }}", - "title": "{{ partial "docs/title" $page }}", + "title": {{ (partial "docs/title" $page) | jsonify}}, "content": {{ $page.Plain | jsonify }} } {{- end -}} @@ -15,7 +15,7 @@ pages: pages, idx: lunr(function() { this.ref("idx"); - this.field("title", { boost: 10000 }); + this.field("title"); this.field("content"); pages.forEach(this.add, this); -- cgit v1.2.3