#150, Add support for menu nesting (before, after menus)

This commit is contained in:
Alex Shpak
2020-02-22 19:30:46 +01:00
parent 59b649cf8b
commit 8369d9a3a7
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -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>