2020-02-12 22:12:41 +01:00
|
|
|
<!--
|
|
|
|
This is template for hugo menus, accepts MenuEntity as context
|
|
|
|
https://gohugo.io/variables/menus/
|
|
|
|
-->
|
|
|
|
{{ if . }}
|
2020-02-22 19:30:46 +01:00
|
|
|
{{ template "book-menu-hugo" . }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "book-menu-hugo" }}
|
2020-02-12 22:12:41 +01:00
|
|
|
<ul>
|
|
|
|
{{ range . }}
|
|
|
|
<li>
|
2022-11-02 23:42:10 +01:00
|
|
|
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if not .Page }}target="_blank" rel="noopener"{{ end }}>
|
2020-02-12 22:12:41 +01:00
|
|
|
{{- .Pre -}}
|
|
|
|
{{ with .Page }}
|
|
|
|
{{ partial "docs/title" .Page }}
|
|
|
|
{{ else }}
|
|
|
|
{{ .Name }}
|
|
|
|
{{ end }}
|
|
|
|
{{- .Post -}}
|
|
|
|
</a>
|
2020-02-22 19:30:46 +01:00
|
|
|
{{- with .Children }}
|
|
|
|
{{ template "book-menu-hugo" . }}
|
|
|
|
{{- end }}
|
2020-02-12 22:12:41 +01:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|