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" theme = "dot"
# site title # site title
title = "Dot" title = "Dot"
# disable language switch selection box # default content language
disableLanguageSwitchingButton = true defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
############################# Default Parameters ########################## ############################# Default Parameters ##########################
[params] [params]
@ -91,8 +92,6 @@ link = "#"
weight = 4 weight = 4
# banner # banner
[Languages.en.params.banner] [Languages.en.params.banner]
title = "Support Center & Knowledge base" title = "Support Center & Knowledge base"

View file

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