From 51694913b469631e187ac5384d9c31c46fe8d1bf Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sat, 26 Nov 2022 02:25:43 -0500 Subject: [PATCH] Added feedjson --- layouts/_default/list.feedjson.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 layouts/_default/list.feedjson.json diff --git a/layouts/_default/list.feedjson.json b/layouts/_default/list.feedjson.json new file mode 100644 index 0000000..62a1faf --- /dev/null +++ b/layouts/_default/list.feedjson.json @@ -0,0 +1,22 @@ +{ + "version": "https://jsonfeed.org/version/1.1", + "title": "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}", + "home_page_url": "{{ .Site.BaseURL }}", + "feed_url": "{{ .Permalink }}", + "description": "{{ .Description }}", + "items": [{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }} + { + "author": { + {{with $.Site.Author.name }}"name": "{{ . }}",{{ end }} + "url": "{{ .Site.BaseURL }}" + }, + "id": "{{ $page.Permalink }}", + "content_html": {{ $page.Content | jsonify }}, + "date_published": {{ $page.Date.Format "2006.01.02" | jsonify }}, + "url": "{{ $page.Permalink }}", + "title": {{ $page.Title | jsonify }}, + "tags": {{ $page.Params.tags | jsonify }} + } +{{ end }}] +} +