feat: configurable custom navbar items
The customMenu item from `data/<language>/site.yaml` will only appear if its property `showOnNavbar` is `true`. Example: ``` customMenus: - name: Imprint url: posts/imprint showOnNavbar: false ```
This commit is contained in:
parent
2b9ce8fb29
commit
b7fef16087
1 changed files with 5 additions and 3 deletions
|
@ -115,9 +115,11 @@
|
|||
</li>
|
||||
{{ end }}
|
||||
{{ range $customMenus }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
||||
</li>
|
||||
{{ if .showOnNavbar }}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .IsTranslated }}
|
||||
{{ partial "navigators/lang-selector.html" . }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue