Managing i18n

This commit is contained in:
Hugo Martin 2020-08-04 18:47:20 +02:00 committed by Emruz Hossain
parent 6c2cca0127
commit 9930b37554
5 changed files with 37 additions and 12 deletions

View file

@ -3,9 +3,9 @@
<div class="row text-left">
<div class="col-md-4 col-sm-12">
<h5>Navigation</h5>
{{ if .Site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }}
<ul>
{{- range sort .Site.Data.sections "section.weight" }}
{{- range sort (index .Site.Data .Site.Language.Lang).sections "section.weight" }}
{{ if and (.section.enable) (.section.showOnNavbar)}}
<li class="nav-item">
<a class="smooth-scroll" href="/#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>