From 8191679266bab6405ec80069faa8ddd6a86f92d9 Mon Sep 17 00:00:00 2001 From: Phil Date: Wed, 8 Jan 2025 15:24:53 -0700 Subject: [PATCH] add json feed template for notes --- layouts/notes/index.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 layouts/notes/index.json diff --git a/layouts/notes/index.json b/layouts/notes/index.json new file mode 100644 index 0000000..05c7b4e --- /dev/null +++ b/layouts/notes/index.json @@ -0,0 +1,21 @@ +{ + "version": "https://jsonfeed.org/version/1.1", + "title": "{{ .Site.Title }} - Notes Feed", + "home_page_url": "{{ .Site.BaseURL }}", + "feed_url": "{{ .Permalink }}", + "description": "A feed of my notes from {{ .Site.Title }}", + "items": [ + {{- range .Pages.ByDate.Reverse -}} + { + "id": "{{ .Permalink }}", + "url": "{{ .Permalink }}", + "content_text": {{ .Plain | jsonify }}, + "date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}", + {{- if .Params.tags }} + "tags": {{ .Params.tags | jsonify }}, + {{- end }} + {{- if not (last .Pages.ByDate.Reverse .) }},{{ end }} + } + {{- end }} + ] +}