Adjusting postroll RSS/Atom/JSONFeed

This commit is contained in:
Brandon Rozek 2025-04-02 00:00:30 -04:00
parent 6a9e1847d7
commit 9a663b328a
3 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{
"id": "{{ .Params.url }}",
"url": "{{ .Params.url }}",
"title": {{ .Title | jsonify }},
"authors": ["{{ .Params.author }}"],
{{ $pre := "<p><strong>Brandon's Comment:</strong></p>" }}
{{ $content := .Content }}
{{ $combined := printf "%s%s" $pre $content}}
{{ $combined := $combined | jsonify (dict "noHTMLEscape" true) }}
"content_html": {{ $combined }},
"date_published": "{{ .Date.Format "2006.01.02" }}"
}