summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorNicholas Johnson <mail@nicholasjohnson.ch>2024-06-18 00:00:00 +0000
committerNicholas Johnson <mail@nicholasjohnson.ch>2024-06-18 00:00:00 +0000
commit5dedbac7a3de4fcbf4d13dbeeec82dd2f277c21e6d7f201def813a6776196e54 (patch)
treea37e6e92d4e7e861f0ac62c72a0bc2fb4f7e5e6d0e3178abcc9d33267a40b590 /layouts
parent971d8f233f59d578410b95f6aa44821084690724740917217769924f1aa6a430 (diff)
downloadhugo-theme-journal-1.3.4.tar.gz
hugo-theme-journal-1.3.4.zip
Correct reference index countingv1.3.4
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.gmi3
1 files changed, 2 insertions, 1 deletions
diff --git a/layouts/_default/single.gmi b/layouts/_default/single.gmi
index c9b6896..5c470ab 100644
--- a/layouts/_default/single.gmi
+++ b/layouts/_default/single.gmi
@@ -37,8 +37,9 @@
{{ $chunk_refs := findRESubmatch `!?\[[\t ]*(.+?)[\t ]*\]\([\t ]*(.+?)(?:[\t ]+"(.+?)")?[\t ]*\)` $rendered_text -}}
{{ range $chunk_refs -}}
+ {{ $ref_index = add $ref_index 1 -}}
{{ $chunk_ref := dict
- "index" (add $ref_index 1)
+ "index" $ref_index
"text" (index . 1)
"link" (index . 2)
"title" (index . 3)