search: refactor so that only one index is generated

This commit is contained in:
George Cushen committed 2018-08-27 22:31:21 +01:00
1 parent 47c30556f9
commit 36084c5607
3 files changed
+2 -8

No files matched your search

+1 -7
View File
@@ -37,15 +37,9 @@ defaultContentLanguageInSubdir = false
enableGitInfo = false
[outputs]
home = [ "HTML", "CSS", "RSS", "search" ]
home = [ "HTML", "CSS", "RSS", "JSON" ]
section = [ "HTML", "RSS" ]
[outputFormats.search]
baseName = "search"
isPlainText = true
mediaType = "application/json"
notAlternative = true
# Configure BlackFriday Markdown rendering.
# See: https://gohugo.io/getting-started/configuration/#configure-blackfriday
[blackfriday]
File renamed without changes.
+1 -1
View File
@@ -66,7 +66,7 @@
{{ if ne .Site.Params.search.engine 0 }}
{{/* Configure search engine. */}}
<script>
const search_index_filename = {{ "/search.json" | relURL }};
const search_index_filename = {{ "/index.json" | relURL }};
const i18n = {
'placeholder': {{ i18n "search_placeholder" }},
'no_results': {{ i18n "search_no_results" }}