mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
10 lines
No EOL
388 B
HTML
10 lines
No EOL
388 B
HTML
{{- $content := .Inner }}
|
|
{{- $name := (.Get "name") }}
|
|
{{- if .Parent }}
|
|
{{- if not (.Parent.Scratch.Get "tabs") }}
|
|
{{- .Parent.Scratch.Set "tabs" slice }}
|
|
{{- end }}
|
|
{{- $.Parent.Scratch.Add "tabs" (dict "name" (trim $name " ") "content" $content ) }}
|
|
{{- else }}
|
|
{{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}}
|
|
{{- end}} |