diff --git a/layouts/shortcodes/marginnote.html b/layouts/shortcodes/marginnote.html index 97baf92..71b3c64 100644 --- a/layouts/shortcodes/marginnote.html +++ b/layouts/shortcodes/marginnote.html @@ -1,4 +1,9 @@ -{{- $label := (add .Ordinal 1) -}} +{{- with $.Page.Scratch.Get "marginnoteCounter" -}} +{{- $.Page.Scratch.Set "marginnoteCounter" (add . 1) -}} +{{- else -}} +{{- $.Page.Scratch.Set "marginnoteCounter" 1 -}} +{{- end -}} +{{- $label := $.Page.Scratch.Get "marginnoteCounter" -}} {{- $ind := .Get "ind" | default .Site.Params.marginNoteInd -}}