mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-09 10:50:34 -05:00
Added feedjson
This commit is contained in:
parent
33b910eaf6
commit
51694913b4
1 changed files with 22 additions and 0 deletions
22
layouts/_default/list.feedjson.json
Normal file
22
layouts/_default/list.feedjson.json
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": "{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} | {{ end }}{{ .Site.Title }}{{ end }}",
|
||||
"home_page_url": "{{ .Site.BaseURL }}",
|
||||
"feed_url": "{{ .Permalink }}",
|
||||
"description": "{{ .Description }}",
|
||||
"items": [{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
|
||||
{
|
||||
"author": {
|
||||
{{with $.Site.Author.name }}"name": "{{ . }}",{{ end }}
|
||||
"url": "{{ .Site.BaseURL }}"
|
||||
},
|
||||
"id": "{{ $page.Permalink }}",
|
||||
"content_html": {{ $page.Content | jsonify }},
|
||||
"date_published": {{ $page.Date.Format "2006.01.02" | jsonify }},
|
||||
"url": "{{ $page.Permalink }}",
|
||||
"title": {{ $page.Title | jsonify }},
|
||||
"tags": {{ $page.Params.tags | jsonify }}
|
||||
}
|
||||
{{ end }}]
|
||||
}
|
||||
|
Loading…
Reference in a new issue