aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-08-08 13:15:19 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-08-08 13:17:47 +0200
commitdf8d186d381557da67fe550bce1490b868932724 (patch)
treef9c5c43579fb6a952c7c60520844fd1484a376b7 /assets
parentb95fbf9750f347d166ed11365a2447b290a6a17c (diff)
Jsonify title in search as well
Diffstat (limited to 'assets')
-rw-r--r--assets/search-data.js6
1 files changed, 3 insertions, 3 deletions
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);