diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-02-12 22:12:41 +0100 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-02-12 22:12:41 +0100 |
commit | 2088c9a0cb5e41554ad450a464b54f4c628e712b (patch) | |
tree | 1a5055daacaba1f5078cfc1a942f30630a894156 /layouts/partials/docs/menu-hugo.html | |
parent | 59479b17ac06d4f0bccb5d3a2bcc88af4928ba4d (diff) |
Add support for hugo menus
Diffstat (limited to 'layouts/partials/docs/menu-hugo.html')
-rw-r--r-- | layouts/partials/docs/menu-hugo.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/layouts/partials/docs/menu-hugo.html b/layouts/partials/docs/menu-hugo.html new file mode 100644 index 0000000..e21e8cb --- /dev/null +++ b/layouts/partials/docs/menu-hugo.html @@ -0,0 +1,21 @@ +<!-- + This is template for hugo menus, accepts MenuEntity as context + https://gohugo.io/variables/menus/ +--> +{{ if . }} +<ul> + {{ range . }} + <li> + <a href="{{ .URL }}" {{ if not .Page }}target="_blank" rel="noopener"{{ end }}> + {{- .Pre -}} + {{ with .Page }} + {{ partial "docs/title" .Page }} + {{ else }} + {{ .Name }} + {{ end }} + {{- .Post -}} + </a> + </li> + {{ end }} +</ul> +{{ end }} |