From 334158af7a9ee4a04fd10c8f16d6159a33993695 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Wed, 3 Sep 2025 16:37:18 +0200 Subject: [PATCH] chore: replace .Scratch with .Store (#818) --- layouts/_partials/components/pager.html | 2 +- layouts/_partials/footer.html | 2 +- layouts/_partials/sidebar.html | 2 +- layouts/blog/single.html | 2 +- layouts/list.rss.xml | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layouts/_partials/components/pager.html b/layouts/_partials/components/pager.html index 973b6b4..1adc43a 100644 --- a/layouts/_partials/components/pager.html +++ b/layouts/_partials/components/pager.html @@ -1,6 +1,6 @@ {{/* Article navigation on the footer of the article */}} -{{- $reversePagination := .Scratch.Get "reversePagination" | default false -}} +{{- $reversePagination := .Store.Get "reversePagination" | default false -}} {{- $prev := cond $reversePagination .PrevInSection .NextInSection -}} {{- $next := cond $reversePagination .NextInSection .PrevInSection -}} diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html index 4fd6911..889a005 100644 --- a/layouts/_partials/footer.html +++ b/layouts/_partials/footer.html @@ -1,4 +1,4 @@ -{{- $enableFooterSwitches := .Scratch.Get "enableFooterSwitches" | default false -}} +{{- $enableFooterSwitches := .Store.Get "enableFooterSwitches" | default false -}} {{- $displayThemeToggle := site.Params.theme.displayToggle | default true -}} {{- $footerSwitchesVisible := and $enableFooterSwitches (or hugo.IsMultilingual $displayThemeToggle) -}} {{- $copyrightSectionVisible := or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright -}} diff --git a/layouts/_partials/sidebar.html b/layouts/_partials/sidebar.html index 540261d..e5c69ae 100644 --- a/layouts/_partials/sidebar.html +++ b/layouts/_partials/sidebar.html @@ -30,7 +30,7 @@ {{- if $disableSidebar -}} {{- if $displayPlaceholder }}
{{ end -}} - {{ .context.Scratch.Set "enableFooterSwitches" true }} + {{ .context.Store.Set "enableFooterSwitches" true }} {{- else -}}