From f5777739587aa71915f1b46c38e22affa090c97d Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 8 Jan 2025 16:07:08 -0700 Subject: [PATCH] another comma fix --- layouts/notes/list.jsonfeed.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/notes/list.jsonfeed.json b/layouts/notes/list.jsonfeed.json index 89e8166..b4b874a 100644 --- a/layouts/notes/list.jsonfeed.json +++ b/layouts/notes/list.jsonfeed.json @@ -5,13 +5,14 @@ "feed_url": "{{ .Permalink }}", "description": "A feed of my notes from {{ .Site.Title }}", "items": [ - {{- range $index, $page := .Pages.ByDate.Reverse }} + {{- $length := sub (len .Pages) 1 -}} + {{- range $index, $page := .Pages.ByDate.Reverse -}} { "id": "{{ $page.Permalink }}", "url": "{{ $page.Permalink }}", "content_text": {{ $page.Plain | jsonify }}, "date_published": "{{ $page.Date.Format "2006-01-02T15:04:05Z07:00" }}" - }{{ if lt $index (sub (len .Pages) 1) }},{{ end }} + }{{ if lt $index $length }},{{ end }} {{- end }} ] }