From 38263a5906f2bd465521328c23659dae372451dc Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 8 Jan 2025 15:54:46 -0700 Subject: [PATCH] update jsonfeed for notes --- layouts/notes/list.jsonfeed.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/notes/list.jsonfeed.json b/layouts/notes/list.jsonfeed.json index 351d0d3..7d38421 100644 --- a/layouts/notes/list.jsonfeed.json +++ b/layouts/notes/list.jsonfeed.json @@ -5,13 +5,13 @@ "feed_url": "{{ .Permalink }}", "description": "A feed of my notes from {{ .Site.Title }}", "items": [ - {{- range .Pages.ByDate.Reverse -}} + {{- range $index, $page := .Pages.ByDate.Reverse -}} { - "id": "{{ .Permalink }}", - "url": "{{ .Permalink }}", - "content_text": {{ .Plain | jsonify }}, - "date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" - }{{ if not (last .Pages.ByDate.Reverse .) }},{{ end }} + "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 }} {{- end }} ] }