-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Open
Labels
Milestone
Description
Deprecating Page.Scratch was the right thing to do, but the example above may be a rare useful example of the old behavior.
It would be simple to add a hugo.BuildCount method (I guess starting at 1).
In the topic above, you could possibly do:
{{- if ne (.Page.Store.Get "myCounter") hugo.BuildCount -}}
<script type="text/javascript" src= '(...)'></script>
<style>(...)<\style>
{{- end -}}
{{- .Page.Store.Set "myCounter" hugo.BuildCount -}}/cc @jmooring
doompadee, jmooring and mysiki