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