From d7c644f0e7062bd847911bcfd9d9eaf401f3c36d Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 19 May 2021 20:26:21 +0200 Subject: Refactor search, prepare for pre-built indexing --- layouts/partials/docs/html-head.html | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index 905904f..647511b 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -12,22 +12,23 @@ {{- range .Translations }} - -{{ end -}} + +{{- end -}} {{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }} -{{- if default true .Site.Params.BookSearch }} -{{- $searchJSFile := printf "%s.search.js" .Language.Lang }} -{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} - +{{- if default true .Site.Params.BookSearch -}} + {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} + {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} + + {{ end -}} -{{- if .Site.Params.BookServiceWorker }} -{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} - +{{- if .Site.Params.BookServiceWorker -}} + {{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} + {{ end -}} {{- template "_internal/google_analytics_async.html" . -}} -- cgit v1.2.3