From 7b52bf423214194ab39392db6e9bc2de9d36a02d Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Sun, 10 Nov 2019 14:35:07 +0100 Subject: #87, Add support for multilang search index generation --- assets/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'assets/search.js') diff --git a/assets/search.js b/assets/search.js index 89302b1..f21d4bf 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1,6 +1,8 @@ 'use strict'; -{{- $searchData := resources.Get "search-data.js" | resources.ExecuteAsTemplate "search-data.js" . | resources.Minify | resources.Fingerprint }} +{{ $searchDataFile := printf "%s.%s" .Language.Lang "search-data.js" }} +{{ $searchData := resources.Get "search-data.js" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }} + (function() { const input = document.querySelector('#book-search-input'); const results = document.querySelector('#book-search-results'); -- cgit v1.2.3