modified navigation and config file for language issue

This commit is contained in:
somrat 2019-11-18 11:24:27 +06:00
parent 109c92be39
commit 76597ea394
2 changed files with 5 additions and 6 deletions

View file

@ -5,8 +5,9 @@ baseURL = "https://examplesite.com/"
theme = "dot"
# site title
title = "Dot"
# disable language switch selection box
disableLanguageSwitchingButton = true
# default content language
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
############################# Default Parameters ##########################
[params]
@ -91,8 +92,6 @@ link = "#"
weight = 4
# banner
[Languages.en.params.banner]
title = "Support Center & Knowledge base"

View file

@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-lg navbar-light">
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}{{ .Language.LanguageName | lower }}">
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}">
{{ $logo:= .Site.Params.logo }}
{{ $logoWhite:= .Site.Params.logoWhite }}
{{ if (or (eq $logo "") (eq $logoWhite "")) }}
@ -43,7 +43,7 @@
{{ end }}
</ul>
<!-- Language List -->
{{- if and .Site.IsMultiLingual (not .Site.Params.DisableLanguageSwitchingButton)}}
{{- if .Site.IsMultiLingual }}
<select id="select-language" onchange="location = this.value;">
{{ $siteLanguages := .Site.Languages}}
{{ $pageLang := .Page.Lang}}