mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
search: don't break JS in multilang setup if search is disabled #140
This commit is contained in:
parent
8a90e237f3
commit
48b0a66d40
2 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,9 @@
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var index_url={{ "index.json" | relLangURL }};
|
||||||
|
var root_url="/";
|
||||||
|
var baseUri=root_url.replace(/\/$/, '');
|
||||||
|
</script>
|
||||||
<nav id="sidebar" class="{{ if $.Site.Params.showVisitedLinks }}showVisitedLinks{{ end }}">
|
<nav id="sidebar" class="{{ if $.Site.Params.showVisitedLinks }}showVisitedLinks{{ end }}">
|
||||||
{{- $currentNode := . }}
|
{{- $currentNode := . }}
|
||||||
{{- $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
{{- $showvisitedlinks := .Site.Params.showVisitedLinks }}
|
||||||
|
|
|
@ -8,9 +8,4 @@
|
||||||
<script src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
<script src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
||||||
{{ "<!-- hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic: -->" | safeHTML }}
|
{{ "<!-- hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic: -->" | safeHTML }}
|
||||||
{{ "<!-- https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72 -->" | safeHTML }}
|
{{ "<!-- https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72 -->" | safeHTML }}
|
||||||
<script>
|
|
||||||
var index_url={{ "index.json" | relLangURL }};
|
|
||||||
var root_url="/";
|
|
||||||
var baseUri=root_url.replace(/\/$/, '');
|
|
||||||
</script>
|
|
||||||
<script src="{{ "js/search.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
<script src="{{ "js/search.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|
Loading…
Reference in a new issue