Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/puresyntax71/hugo-theme-chunky-poster.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpuresyntax71 <34715246+puresyntax71@users.noreply.github.com>2020-01-07 09:12:48 +0300
committerpuresyntax71 <34715246+puresyntax71@users.noreply.github.com>2020-01-07 09:12:48 +0300
commit004efe914bcbcc1fdda06a598a3533f119eb9e89 (patch)
treeb4a1a88361be6cf042e1805e262a4a60d157eaa1
parenteeb0bd83edf9a2e802f9d287662b13c3e62a9f7d (diff)
Add a switch to show language switcher.
-rwxr-xr-xexampleSite/config.toml1
-rw-r--r--layouts/partials/header.html4
2 files changed, 4 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index d9900cf..52bbb55 100755
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -32,6 +32,7 @@ author = "authors"
description = "Lorem ipsum dolor sit amet."
homepageImage = "/images/homepage-image.jpg"
share = true
+ showLanguageSwitcher = false
[params.social]
rss = true
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 6cb45d2..2543e9c 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -7,7 +7,9 @@
</button>
<div class="collapse navbar-collapse" id="main-menu">
<ul class="navbar-nav ml-auto">
- {{ partial "i18nlist.html" . }}
+ {{- if .Site.Params.showLanguageSwitcher -}}
+ {{ partial "i18nlist.html" . }}
+ {{- end -}}
{{ with .Site.Menus.main }}
{{ range . }}
<li class="nav-item{{ if $current.IsMenuCurrent "main" . }} active{{ end }}"><a class="nav-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>