aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/menu-hugo.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2020-02-22 19:30:46 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2020-02-22 19:30:46 +0100
commit8369d9a3a75c67a9487a6deec0db4157ae8bf3a0 (patch)
treec7e9b357e7f6df4704e2f7d0bd90476152bc1292 /layouts/partials/docs/menu-hugo.html
parent59b649cf8b518c03249719dde1d2cdb953bce238 (diff)
#150, Add support for menu nesting (before, after menus)
Diffstat (limited to 'layouts/partials/docs/menu-hugo.html')
-rw-r--r--layouts/partials/docs/menu-hugo.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/docs/menu-hugo.html b/layouts/partials/docs/menu-hugo.html
index e21e8cb..02391ae 100644
--- a/layouts/partials/docs/menu-hugo.html
+++ b/layouts/partials/docs/menu-hugo.html
@@ -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>