mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: to create a scratch pad that is not reset on server rebuilds, use the Store method instead of Scratch method (fixes #417)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $author := .Scratch.Get "author" -}}
|
||||
{{- $author := .Store.Get "author" -}}
|
||||
# {{ .Title }}
|
||||
|
||||
{{ if $params.password -}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- .Scratch.Set "author" $author -}}
|
||||
{{- .Store.Set "author" $author -}}
|
||||
|
||||
{{- /* Toc data patch */ -}}
|
||||
{{- $toc := $params.toc -}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $author := .Scratch.Get "author" -}}
|
||||
{{- $params := .Params | merge .Site.Params.page -}}
|
||||
{{- $author := .Store.Get "author" -}}
|
||||
|
||||
<span class="post-author">
|
||||
{{- $content := $author.name -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
Reference in New Issue
Block a user