13 lines
430 B
HTML
13 lines
430 B
HTML
{{- $name := .Get 0 -}}
|
|
{{- $number := 1 -}}
|
|
{{- with .Page.Scratch.Get "internal-ref-counter" -}}
|
|
{{- $number = add . 1 }}
|
|
{{- end -}}
|
|
{{- .Page.Scratch.Set "internal-ref-counter" $number -}}
|
|
{{- .Page.Scratch.SetInMap "internal-ref" $name $number -}}
|
|
|
|
<span class="internal-ref" id="internal-ref-{{ $name }}">
|
|
{{ .Inner }}
|
|
<span class="internal-ref-counter">{{ $number }}</span></span>
|
|
{{- /* chomp whitespace at the end */ -}}
|