mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 12:52:10 +00:00
Fix off-by-one for codeindex
This commit is contained in:
parent
b1c5584679
commit
4e192084b2
1 changed files with 1 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
{{- $codeIndex := (.Page.Scratch.Get "codeIndex") -}}
|
{{- $codeIndex := (.Page.Scratch.Get "codeIndex") -}}
|
||||||
{{- $id := (printf `code-%d` (sub $codeIndex 1)) -}}
|
{{- $id := (printf `code-%d` $codeIndex) -}}
|
||||||
{{- with .Get "id" -}}
|
{{- with .Get "id" -}}
|
||||||
{{- $id = . -}}
|
{{- $id = . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in a new issue