sigs.k8s.io/kueue@v0.6.2/site/layouts/shortcodes/blocks/tab.html (about) 1 {{ if .Parent }} 2 {{ $name := trim (.Get "name") " " }} 3 {{ $include := trim (.Get "include") " "}} 4 {{ $codelang := .Get "codelang" }} 5 {{ if not (.Parent.Scratch.Get "tabs") }} 6 {{ .Parent.Scratch.Set "tabs" slice }} 7 {{ end }} 8 {{ with .Inner }} 9 {{ if $codelang }} 10 {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" (highlight . $codelang "") ) }} 11 {{ else }} 12 {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} 13 {{ end }} 14 {{ else }} 15 {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "include" $include "codelang" $codelang) }} 16 {{ end }} 17 {{ else }} 18 {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} 19 {{ end}}