1
0
mirror of https://github.com/danbee/danbarber.me.hugo.git synced 2025-03-04 08:59:18 +00:00

Fix JSONFeed validation errors

This commit is contained in:
Daniel Barber 2019-10-26 17:45:26 -04:00
parent 70604a94d7
commit bf7345b9b0
3 changed files with 8 additions and 7 deletions

View File

@ -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 }}
]

View File

@ -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 }}
]

View File

@ -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 }}
]