diff --git a/layouts/_default/single.md b/layouts/_default/single.md index 896459710..7fe4cff81 100644 --- a/layouts/_default/single.md +++ b/layouts/_default/single.md @@ -1,5 +1,5 @@ {{- $params := .Scratch.Get "params" -}} -{{- $author := .Scratch.Get "author" -}} +{{- $author := .Store.Get "author" -}} # {{ .Title }} {{ if $params.password -}} diff --git a/layouts/partials/init/patch.html b/layouts/partials/init/patch.html index 5fb01c5a0..b472e21f6 100644 --- a/layouts/partials/init/patch.html +++ b/layouts/partials/init/patch.html @@ -29,7 +29,7 @@ -}} {{- end -}} {{- end -}} -{{- .Scratch.Set "author" $author -}} +{{- .Store.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 81ac927d3..5a889df46 100644 --- a/layouts/partials/single/post-author.html +++ b/layouts/partials/single/post-author.html @@ -1,5 +1,5 @@ -{{- $params := .Scratch.Get "params" -}} -{{- $author := .Scratch.Get "author" -}} +{{- $params := .Params | merge .Site.Params.page -}} +{{- $author := .Store.Get "author" -}} {{- $content := $author.name -}} diff --git a/layouts/partials/single/reward.html b/layouts/partials/single/reward.html index e5c79c9ea..d7f347117 100644 --- a/layouts/partials/single/reward.html +++ b/layouts/partials/single/reward.html @@ -1,4 +1,4 @@ {{- $reward := .Scratch.Get "reward" -}} -{{- $author := .Scratch.Get "author" -}} +{{- $author := .Store.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 182a4d759..fe59758cf 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.Scratch.Get "author").name -}} +{{- $author := (.Get "author") | default (.Get 4) | default (.Page.Store.Get "author").name -}} {{- $comment := (.Get "comment") | default (.Get 5) -}} {{- $mode := (.Get "mode") | default (.Get 6) -}} {{- $reward := dict "enable" true "comment" $comment "mode" $mode -}}