website/themes/terminal-plus-minus/layouts/index.json

20 lines
992 B
JSON
Raw Normal View History

2019-09-03 06:07:07 +00:00
{
"version": "https://jsonfeed.org/version/1",
"title": "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}",
"home_page_url": "{{ .Site.BaseURL }}",
"feed_url": "{{ with .OutputFormats.Get "json" }}{{ .Permalink }}{{ end }}",
"description": "Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}",
"favicon": "{{ "assets/icon.png" | absURL }}",
"icon": "{{ "assets/icon.png" | absURL }}",
"author": {
"name": "{{ with .Site.Author.name }}{{ . }}{{ end }}"
},
"items": [
{{- $limit := cond (gt .Site.Params.feedLimit 0) .Site.Params.feedLimit 10 -}}
{{- $pages := first $limit (where .RegularPages "File.Dir" "!=" "/") -}}
{{- $objects := apply $pages "partial" "json_feed_entry.json" "." -}}
{{- $clean := apply $objects "chomp" "." -}}
{{- delimit $clean "," -}}
]
}