doc/themes/hugo-geekdoc/layouts/shortcodes/tab.html
Felix Niederwanger 2a9c145b75
Update hugo-geekdoc theme to v0.32.4
Update the used version of hugo-geekdoc to 0.32.4
2022-06-29 10:13:52 +02:00

13 lines
366 B
HTML

{{ if .Parent }}
{{ $name := .Get 0 }}
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
{{ if not (.Parent.Scratch.Get $group) }}
{{ .Parent.Scratch.Set $group slice }}
{{ end }}
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
{{ else }}
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
{{ end }}