Handle disabled section

This commit is contained in:
hossainemruz 2020-07-02 21:17:43 +06:00
parent f6b0e97de2
commit a6d5035c67
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@
{{ end }}
</ul>
{{ if .Site.Data.sections }}
{{ range first 1 (sort .Site.Data.sections "section.weight") }}
{{ range first 1 (where (sort .Site.Data.sections "section.weight") ".section.enable" true) }}
<a href="#{{ replace (lower .section.name) " " "-" }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
{{ end }}
{{ end }}

View file

@ -21,7 +21,7 @@
</li>
{{- if .Site.Data.sections }}
{{- range sort .Site.Data.sections "section.weight" }}
{{ if .section.showOnNavbar }}
{{ if (and .section.enable .section.showOnNavbar) }}
<li class="nav-item">
<a class="nav-link smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
</li>