add json feed template for notes
This commit is contained in:
parent
0963c24be2
commit
8191679266
21
layouts/notes/index.json
Normal file
21
layouts/notes/index.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": "{{ .Site.Title }} - Notes Feed",
|
||||
"home_page_url": "{{ .Site.BaseURL }}",
|
||||
"feed_url": "{{ .Permalink }}",
|
||||
"description": "A feed of my notes from {{ .Site.Title }}",
|
||||
"items": [
|
||||
{{- range .Pages.ByDate.Reverse -}}
|
||||
{
|
||||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
"content_text": {{ .Plain | jsonify }},
|
||||
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
{{- if .Params.tags }}
|
||||
"tags": {{ .Params.tags | jsonify }},
|
||||
{{- end }}
|
||||
{{- if not (last .Pages.ByDate.Reverse .) }},{{ end }}
|
||||
}
|
||||
{{- end }}
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user