hugo-theme-terminal

My Fork of the Terminal Hugo Theme
git clone https://git.repetitions.de/hugo-theme-terminal

tab.html (364B)


 1 {{ if .Parent -}}
 2   {{- $name := trim (.Get "name") " " -}}
 3   {{- if not (.Parent.Scratch.Get "tabs") -}}
 4     {{- .Parent.Scratch.Set "tabs" slice -}}
 5   {{- end -}}
 6   {{- with .Inner }}
 7     {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) -}}
 8   {{ end }}
 9 {{ else }}
10   {{- errorf "[%s] %q: tab shortcode missing its parent" .Page.Path -}}
11 {{- end }}
12