Find first section for chevron navigation (#26)

* Find first section for chevron navigation

* Handle disabled section

Co-authored-by: hossainemruz <emruz@appscode.com>
This commit is contained in:
Jason Tipton 2020-07-02 07:21:09 -08:00 committed by GitHub
parent 436746b170
commit 8658773212
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

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>