From bf7345b9b00bc5ec10d753c6226f19bd1daaf914 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Sat, 26 Oct 2019 17:45:26 -0400 Subject: [PATCH] Fix JSONFeed validation errors --- layouts/index.json | 4 ++-- layouts/section/blog.json | 7 ++++--- layouts/section/photos.json | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/layouts/index.json b/layouts/index.json index a0141367..ebe17381 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -19,11 +19,11 @@ "image": "{{ $image.RelPermalink }}", {{ end }} {{ if .Params.categories }} - "categories": ["{{ delimit .Params.categories "," }}"], + "tags": ["{{ delimit .Params.categories "," }}"], {{ end }} "content_html": {{ .Content | jsonify }}, "url": "{{ .Permalink }}", - "date_published": "{{ .Date }}" + "date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}" } {{ end }} ] diff --git a/layouts/section/blog.json b/layouts/section/blog.json index 1c4f9c29..f8c51a28 100644 --- a/layouts/section/blog.json +++ b/layouts/section/blog.json @@ -10,11 +10,12 @@ { "id": "{{ .Permalink }}", "title": "{{ .Title }}", + {{ if .Params.categories }} + "tags": ["{{ delimit .Params.categories "\", \"" }}"], + {{ end }} "content_html": {{ .Content | jsonify }}, "url": "{{ .Permalink }}", - "date_published": "{{ .Date }}"{{ if .Params.categories }}, - "categories": ["{{ delimit .Params.categories "\", \"" }}"] - {{ end }} + "date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}" } {{ end }} ] diff --git a/layouts/section/photos.json b/layouts/section/photos.json index a7323893..84887ca0 100644 --- a/layouts/section/photos.json +++ b/layouts/section/photos.json @@ -19,11 +19,11 @@ "image": "{{ $image.RelPermalink }}", {{ end }} {{ if .Params.categories }} - "categories": ["{{ delimit .Params.categories "," }}"], + "tags": ["{{ delimit .Params.categories "," }}"], {{ end }} "content_html": {{ .Content | jsonify }}, "url": "{{ .Permalink }}", - "date_published": "{{ .Date }}" + "date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}" } {{ end }} ]