diff options
author | mms <michal@sapka.me> | 2023-12-24 23:35:44 +0100 |
---|---|---|
committer | mms <michal@sapka.me> | 2023-12-24 23:35:51 +0100 |
commit | e4e8c804f54f3e909e698f67598bb00e436b1e53 (patch) | |
tree | fdd261b7e4efcac9ebb9121a8433fdac40fdd61d /layouts/shortcodes | |
parent | 10bf749a75bb711d960dcce7e8e40078c9ce5eb3 (diff) |
feat: hier menu
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r-- | layouts/shortcodes/menu.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/layouts/shortcodes/menu.html b/layouts/shortcodes/menu.html index 1b3dc54..356c675 100644 --- a/layouts/shortcodes/menu.html +++ b/layouts/shortcodes/menu.html @@ -8,6 +8,18 @@ <a href="{{ .URL }}"> {{ .Name }} </a> + + {{ if .HasChildren }} + <ul> + {{ range .Children }} + <li> + <a href="{{ .URL }}"> + {{ .Name }} + </a> + {{ end }} + </ul> + + {{ end }} {{- end }} </ol> </nav> |