From c9dc7f99c624cb99fd2a9702378d36401cf86888 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:18:16 +0100 Subject: [PATCH] hugo: replace Shortcode.Scratch with Shortcode.Store Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/shortcodes/tab.html | 6 +++--- layouts/shortcodes/tabs.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/shortcodes/tab.html b/layouts/shortcodes/tab.html index 172f0e787b..ddb1b799b7 100644 --- a/layouts/shortcodes/tab.html +++ b/layouts/shortcodes/tab.html @@ -4,9 +4,9 @@ {{ $name := trim (.Get "name") " " }} -{{ if not (.Parent.Scratch.Get "tabs") }} - {{ .Parent.Scratch.Set "tabs" slice }} +{{ if not (.Parent.Store.Get "tabs") }} + {{ .Parent.Store.Set "tabs" slice }} {{ end }} {{ with .Inner }} - {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} + {{ $.Parent.Store.Add "tabs" (dict "name" $name "content" . ) }} {{ end }} diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 2f8484dadb..3f1d845fe9 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -1,5 +1,5 @@ {{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }} -{{ $first := urlize (index (.Scratch.Get "tabs") 0).name }} +{{ $first := urlize (index (.Store.Get "tabs") 0).name }} {{ $group := .Get "group" }} {{ $groupID := fmt.Printf "tabgroup-%s" (urlize $group) }} {{ $persist := .Get "persist" }} @@ -19,7 +19,7 @@ {{ end }} aria-role="tabpanel">
- {{ range (.Scratch.Get "tabs") }} + {{ range (.Store.Get "tabs") }}