Merge pull request #3 from stueja/revert-2-stueja-maxnavitems-patch-1
Revert "make number of navbar elements configurable"
This commit is contained in:
commit
b6fbef474b
1 changed files with 1 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
|||
{{/* variables for enabling/disabling various features */}}
|
||||
{{ $blogEnabled := site.Params.features.blog.enable | default false }}
|
||||
{{ $notesEnabled := site.Params.features.notes.enable | default false }}
|
||||
{{ $maxnavitems := site.Params.features.maxnavitems | default 5 }}
|
||||
|
||||
{{/* keep backward compatibility for blog post */}}
|
||||
{{ if site.Params.enableBlogPost }}
|
||||
|
@ -76,7 +75,7 @@
|
|||
{{ range sort $sections "section.weight" }}
|
||||
{{ if and (.section.enable) (.section.showOnNavbar)}}
|
||||
{{ $sectionCount = add $sectionCount 1}}
|
||||
{{ if le $sectionCount $maxnavitems }}
|
||||
{{ if le $sectionCount 5 }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#{{ partial "helpers/get-section-id.html" . }}">{{ .section.name }}</a>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue