diff options
-rw-r--r-- | assets/search-data.js | 2 | ||||
-rw-r--r-- | layouts/partials/docs/html-head.html | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/assets/search-data.js b/assets/search-data.js index cb7c8da..b4d2cfa 100644 --- a/assets/search-data.js +++ b/assets/search-data.js @@ -1,7 +1,7 @@ 'use strict'; (function() { - const indexCfg = {{ with .Scratch.Get "bookSearchConfig" }} + const indexCfg = {{ with i18n "bookSearchConfig" }} {{ . }}; {{ else }} {}; diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index b280ef9..0e6d06e 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -11,7 +11,6 @@ <link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}"> {{ if default true .Site.Params.BookSearch }} -{{- .Scratch.Set "bookSearchConfig" (i18n "bookSearchConfig") -}} <!-- Remove after https://github.com/gohugoio/hugo/issues/6331 --> {{- $searchJSFile := printf "%s.search.js" .Language.Lang -}} {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} <script defer src="{{ $searchJS.RelPermalink }}" integrity="{{ $searchJS.Data.Integrity }}"></script> |