defaultContentLanguageInSubdir problem fixed
This commit is contained in:
parent
2a0d8ca0bc
commit
ea48d2b0d9
|
@ -13,11 +13,17 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// search
|
// search
|
||||||
|
var baseurl = null;
|
||||||
var runSearch = function() {
|
var runSearch = function() {
|
||||||
{{ if .Site.IsMultiLingual }}
|
{{ if .Site.IsMultiLingual }}
|
||||||
var baseurl = location.origin + "/{{.Site.Language.Lang}}";
|
var isSubDirDisabled = location.pathname.startsWith("/{{.Site.Language.Lang}}");
|
||||||
|
if (isSubDirDisabled) {
|
||||||
|
baseurl = location.origin + "/{{.Site.Language.Lang}}";
|
||||||
|
} else {
|
||||||
|
baseurl = location.origin;
|
||||||
|
}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
var baseurl = location.origin;
|
baseurl = location.origin;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
var searchResults = null;
|
var searchResults = null;
|
||||||
|
|
Loading…
Reference in New Issue