feat: configurable custom navbar items (#514)
* 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
```
* fix: change logic from to
Co-authored-by: stueja <jan@jBook.local>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
@@ -115,9 +115,11 @@
|
|||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range $customMenus }}
|
{{ range $customMenus }}
|
||||||
<li class="nav-item">
|
{{ if (not .hideFromNavbar) }}
|
||||||
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
<li class="nav-item">
|
||||||
</li>
|
<a class="nav-link" href="{{ .url }}">{{ .name }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .IsTranslated }}
|
{{ if .IsTranslated }}
|
||||||
{{ partial "navigators/lang-selector.html" . }}
|
{{ partial "navigators/lang-selector.html" . }}
|
||||||
|
|||||||
Reference in New Issue
Block a user