"expired": false, {{- /* TODO: allow for marking feeds as disabled? */}}
"hubs": [], {{- /* TODO: allow defining rsscloud or websub hub with `type` and `url` */}}
"items": [
{{- range $index, $item := .RegularPages }} {{- /* TODO: if/when i paginate this i need to range over the paginator instead of pages */}}
{
"id": "{{.Permalink}}",
"url": "{{.Permalink}}"
{{- with "" }}, {{- /* TODO: "this is useful for linkblogs" -- wtf is a linkblog exactly? look into this. is it more or less the same as inReplyTo? */}}
"external_url": "{{.}}"
{{- end }}
{{- with .Title }},
"title": {{ . | jsonify }}
{{- end }}
{{- with .Content }},
"content_html": {{. | jsonify}} {{- /* TODO: handle the content_text case for plaintext content. (how to detect if content is plainifyable? just do it always? when to omit content_html? never?) */}}
{{ else }}, {{- /* if there isn't any content, we still have to put something bc it's a required field */}}
"content_text": ""
{{- end }}
{{- if isset .Params "summary" }}
{{- with .Summary }},
"summary": {{ . | jsonify }}
{{- end }}
{{- end }}
{{- with "" }}, {{- /* TODO: handle featured images */}}
"authors": [ {{- /* TODO: make this variable and also loopable? or should this be omitted since it's implied by the top-level prop? maybe omit it only when it's equal? */}}
"author": { {{- /* TODO: make this variable? or should this be omitted since it's implied by the top-level prop? maybe omit it only when it's equal? */}}
{{- with (or .Language.LanguageCode .Site.Language.LanguageCode) }}, {{- /* TODO: should this only be present if it differs from top-level feed language? */}}
"language": {{. | jsonify}}
{{- end }}
} {{- if ne $index (sub (len $.RegularPages) 1)}},{{end}}
{{- end }}
]
{{- with "" }},
"attachments": [ {{- /* TODO: what to use for this? detect "podcast" or similar cases where there are "related resources" to be listed */}}