Handle disabled section
This commit is contained in:
parent
f6b0e97de2
commit
a6d5035c67
2 changed files with 2 additions and 2 deletions
|
@ -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 }}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue