diff --git a/exampleSite/content.en/docs/shortcodes/tabs.md b/exampleSite/content.en/docs/shortcodes/tabs.md index 096892c..8a9ad5e 100644 --- a/exampleSite/content.en/docs/shortcodes/tabs.md +++ b/exampleSite/content.en/docs/shortcodes/tabs.md @@ -3,7 +3,7 @@ Tabs let you organize content by context, for example installation instructions for each supported platform. ```tpl -{{}} +{{}} {{}} # MacOS Content {{}} {{}} # Linux Content {{}} {{}} # Windows Content {{}} @@ -12,7 +12,7 @@ Tabs let you organize content by context, for example installation instructions ## Example -{{< tabs "uniqueid" >}} +{{< tabs >}} {{< tab "MacOS" >}} # MacOS diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index e2a207c..15456d5 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -1,6 +1,6 @@ {{ if .Parent }} {{ $name := .Get 0 }} - {{ $group := printf "tabs-%s" (.Parent.Get 0) }} + {{ $group := printf "tabs-%d" .Parent.Ordinal }} {{ if not (.Parent.Scratch.Get $group) }} {{ .Parent.Scratch.Set $group slice }} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index b28eadf..4960d30 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -1,6 +1,5 @@ {{ if .Inner }}{{ end }} -{{ $id := .Get 0 }} -{{ $group := printf "tabs-%s" $id }} +{{ $group := printf "tabs-%d" .Ordinal }}
{{- range $index, $tab := .Scratch.Get $group -}}