#150, Add support for menu nesting (before, after menus)
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
https://gohugo.io/variables/menus/
|
||||
-->
|
||||
{{ if . }}
|
||||
{{ template "book-menu-hugo" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "book-menu-hugo" }}
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>
|
||||
@@ -15,6 +19,9 @@
|
||||
{{ end }}
|
||||
{{- .Post -}}
|
||||
</a>
|
||||
{{- with .Children }}
|
||||
{{ template "book-menu-hugo" . }}
|
||||
{{- end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user