1
0
Fork 0
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:
Rohan Kumar 2024-01-30 18:50:04 -05:00
parent b1c5584679
commit 4e192084b2
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -1,5 +1,5 @@
{{- $codeIndex := (.Page.Scratch.Get "codeIndex") -}}
{{- $id := (printf `code-%d` (sub $codeIndex 1)) -}}
{{- $id := (printf `code-%d` $codeIndex) -}}
{{- with .Get "id" -}}
{{- $id = . -}}
{{- end -}}