Revert "🐛 Fix: to create a scratch pad that is not reset on server rebuilds, use the Store method instead of Scratch method (fixes #417)"

This reverts commit 9d6ee9feef.
This commit is contained in:
Cell
2024-02-21 14:32:05 +08:00
parent 9d6ee9feef
commit 551938f0b4
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{{- $params := .Scratch.Get "params" -}}
{{- $author := .Store.Get "author" -}}
{{- $author := .Scratch.Get "author" -}}
# {{ .Title }}
{{ if $params.password -}}
+1 -1
View File
@@ -29,7 +29,7 @@
-}}
{{- end -}}
{{- end -}}
{{- .Store.Set "author" $author -}}
{{- .Scratch.Set "author" $author -}}
{{- /* Toc data patch */ -}}
{{- $toc := $params.toc -}}
+2 -2
View File
@@ -1,5 +1,5 @@
{{- $params := .Params | merge .Site.Params.page -}}
{{- $author := .Store.Get "author" -}}
{{- $params := .Scratch.Get "params" -}}
{{- $author := .Scratch.Get "author" -}}
<span class="post-author">
{{- $content := $author.name -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- $reward := .Scratch.Get "reward" -}}
{{- $author := .Store.Get "author" -}}
{{- $author := .Scratch.Get "author" -}}
{{- $options := dict "Reward" $reward "Id" "fi-reward" "Author" $author.name -}}
{{- partial "plugin/reward.html" $options -}}
+1 -1
View File
@@ -3,7 +3,7 @@
{{- $alipay := (.Get "alipay") | default (.Get 1) -}}
{{- $paypal := (.Get "paypal") | default (.Get 2) -}}
{{- $bitcoin := (.Get "bitcoin") | default (.Get 3) -}}
{{- $author := (.Get "author") | default (.Get 4) | default (.Page.Store.Get "author").name -}}
{{- $author := (.Get "author") | default (.Get 4) | default (.Page.Scratch.Get "author").name -}}
{{- $comment := (.Get "comment") | default (.Get 5) -}}
{{- $mode := (.Get "mode") | default (.Get 6) -}}
{{- $reward := dict "enable" true "comment" $comment "mode" $mode -}}