diff --git a/layouts/_default/single.md b/layouts/_default/single.md index 7fe4cff8..89645971 100644 --- a/layouts/_default/single.md +++ b/layouts/_default/single.md @@ -1,5 +1,5 @@ {{- $params := .Scratch.Get "params" -}} -{{- $author := .Store.Get "author" -}} +{{- $author := .Scratch.Get "author" -}} # {{ .Title }} {{ if $params.password -}} diff --git a/layouts/partials/init/patch.html b/layouts/partials/init/patch.html index b472e21f..5fb01c5a 100644 --- a/layouts/partials/init/patch.html +++ b/layouts/partials/init/patch.html @@ -29,7 +29,7 @@ -}} {{- end -}} {{- end -}} -{{- .Store.Set "author" $author -}} +{{- .Scratch.Set "author" $author -}} {{- /* Toc data patch */ -}} {{- $toc := $params.toc -}} diff --git a/layouts/partials/single/post-author.html b/layouts/partials/single/post-author.html index 5a889df4..81ac927d 100644 --- a/layouts/partials/single/post-author.html +++ b/layouts/partials/single/post-author.html @@ -1,5 +1,5 @@ -{{- $params := .Params | merge .Site.Params.page -}} -{{- $author := .Store.Get "author" -}} +{{- $params := .Scratch.Get "params" -}} +{{- $author := .Scratch.Get "author" -}} {{- $content := $author.name -}} diff --git a/layouts/partials/single/reward.html b/layouts/partials/single/reward.html index d7f34711..e5c79c9e 100644 --- a/layouts/partials/single/reward.html +++ b/layouts/partials/single/reward.html @@ -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 -}} diff --git a/layouts/shortcodes/reward.html b/layouts/shortcodes/reward.html index fe59758c..182a4d75 100644 --- a/layouts/shortcodes/reward.html +++ b/layouts/shortcodes/reward.html @@ -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 -}}