defaultContentLanguageInSubdir problem fixed
This commit is contained in:
parent
2a0d8ca0bc
commit
ea48d2b0d9
|
@ -13,11 +13,17 @@
|
|||
|
||||
<script>
|
||||
// search
|
||||
var baseurl = null;
|
||||
var runSearch = function() {
|
||||
{{ 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 }}
|
||||
var baseurl = location.origin;
|
||||
baseurl = location.origin;
|
||||
{{ end }}
|
||||
|
||||
var searchResults = null;
|
||||
|
|
Loading…
Reference in New Issue