Fix navbar issue when no section is configured + fix next-prev navigator
This commit is contained in:
parent
9a95163b7d
commit
b783f11318
2 changed files with 12 additions and 10 deletions
|
@ -19,12 +19,14 @@
|
|||
<li class="nav-item">
|
||||
<a class="nav-link smooth-scroll" href="#home">Home</a>
|
||||
</li>
|
||||
{{- range sort .Site.Data.sections "section.weight" }}
|
||||
{{ if .section.showOnNavbar }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- if .Site.Data.sections }}
|
||||
{{- range sort .Site.Data.sections "section.weight" }}
|
||||
{{ if .section.showOnNavbar }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ $hasCustomMenus:= false }}
|
||||
{{ if and site.Params.customMenus }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue