fix(i18n): fix Hero widget and search for multilingual sites

Fix #820
This commit is contained in:
Paulo Moreno authored and gcushen committed 2018-11-29 12:18:45 +00:00
1 parent ddd8e9ad5d
commit 11c1ebe955
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@
{{ if ne .Site.Params.search.engine 0 }}
{{/* Configure search engine. */}}
<script>
const search_index_filename = {{ "/index.json" | relURL }};
const search_index_filename = {{ "/index.json" | relLangURL }};
const i18n = {
'placeholder': {{ i18n "search_placeholder" }},
'results': {{ i18n "search_results" }},
+1 -1
View File
@@ -5,7 +5,7 @@
{{/* Compute image path outside of HTML style element due to Hugo limitation. */}}
{{ $overlay_img := "" }}
{{ if $header.overlay_img }}
{{ $overlay_img = (printf "img/%s" $header.overlay_img) }}
{{ $overlay_img = (printf "img/%s" $header.overlay_img) | relURL }}
{{end}}
<section id="{{ $page.File.TranslationBaseName }}" class="hero-overlay" style="