Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ module:
proxy: https://proxy.golang.org,direct
hugoVersion:
extended: false
min: "0.124.1"
min: "0.139.0"
mounts:
- source: assets
target: assets
Expand Down
6 changes: 3 additions & 3 deletions layouts/shortcodes/tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
6 changes: 3 additions & 3 deletions layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
@@ -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" }}
Expand All @@ -19,7 +19,7 @@
{{ end }}
aria-role="tabpanel">
<div aria-role="tablist" class="space-x-2">
{{ range (.Scratch.Get "tabs") }}
{{ range (.Store.Get "tabs") }}
<button
class="p-1"
:class="selected === '{{ .name | urlize }}' &&
Expand All @@ -37,7 +37,7 @@
</div>
<hr class="!mt-0" />
<div>
{{ range (.Scratch.Get "tabs") }}
{{ range (.Store.Get "tabs") }}
<div
aria-role="tab"
:class="selected !== '{{ .name | urlize }}' && 'hidden'"
Expand Down