2019-09-20 16:11:12 +00:00
|
|
|
{
|
|
|
|
"version": "https://jsonfeed.org/version/1",
|
|
|
|
"title": "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}",
|
2020-05-12 17:41:43 +00:00
|
|
|
"home_page_url": "{{ "" | absLangURL }}",
|
2019-09-20 16:11:12 +00:00
|
|
|
"feed_url": "{{ with .OutputFormats.Get "json" }}{{ .Permalink }}{{ end }}",
|
|
|
|
"description": "Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}",
|
2020-05-12 17:41:43 +00:00
|
|
|
{{- /* ICON, AHOY! */ -}}
|
|
|
|
"favicon": "{{ "icon.png" | absURL }}",
|
|
|
|
"icon": "{{ "icon.png" | absURL }}",
|
|
|
|
|
2020-05-11 15:59:06 +00:00
|
|
|
{{- with .Site.Author }}
|
2019-09-20 16:11:12 +00:00
|
|
|
"author": {
|
2020-05-11 15:59:06 +00:00
|
|
|
"name": "{{ .name }}"
|
|
|
|
{{- with .email }},
|
|
|
|
"url": "mailto:{{ . }}"
|
|
|
|
{{ end }}
|
2019-09-20 16:11:12 +00:00
|
|
|
},
|
2020-05-11 15:59:06 +00:00
|
|
|
{{- end }}
|
2019-09-20 16:11:12 +00:00
|
|
|
"items":
|
|
|
|
{{- $limit := cond (gt .Site.Params.feedLimit 0) .Site.Params.feedLimit 10 -}}
|
2020-05-12 08:31:55 +00:00
|
|
|
|
|
|
|
{{ $pages := .Pages }}
|
|
|
|
{{ if .IsHome }}
|
|
|
|
{{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
|
|
|
{{ end }}
|
2019-09-20 16:11:12 +00:00
|
|
|
{{- $.Scratch.Add "index" slice -}}
|
2020-05-12 08:31:55 +00:00
|
|
|
{{ range first $limit (where $pages "Params.hidden" "!=" true) }}
|
|
|
|
{{- $.Scratch.Add "index" (dict "id" .Permalink "url" .Permalink "title" .Title "summary" (.Summary | safeHTML) "content_html" (.Content | safeHTML) "tags" .Params.tags "date_published" (.Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML) "date_modified" ( .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML ) ) -}}
|
2019-09-20 16:11:12 +00:00
|
|
|
{{- end -}}
|
|
|
|
{{- $.Scratch.Get "index" | jsonify -}}
|
2020-05-11 15:59:06 +00:00
|
|
|
}
|