mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 09:06:30 -05:00
Added syndication property
This commit is contained in:
parent
0247538cec
commit
5e7105d528
3 changed files with 28 additions and 10 deletions
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"id": "{{ .Permalink }}",
|
|
||||||
"url": "{{ .Permalink }}",
|
|
||||||
"title": {{ .Title | jsonify }},
|
|
||||||
"content_html": {{ .Content | jsonify }},
|
|
||||||
"date_published": "{{ .Date.Format "2006.01.02" }}",
|
|
||||||
"tags": {{ .Params.tags | jsonify }}
|
|
||||||
}
|
|
|
@ -13,7 +13,14 @@
|
||||||
],
|
],
|
||||||
"items": [
|
"items": [
|
||||||
{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
|
{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
|
||||||
{{ .Render "item" }}
|
{
|
||||||
|
"id": "{{ $page.Permalink }}",
|
||||||
|
"url": "{{ $page.Permalink }}",
|
||||||
|
"title": {{ $page.Title | jsonify }},
|
||||||
|
"content_html": {{ $page.Content | jsonify }},
|
||||||
|
"date_published": "{{ $page.Date.Format "2006.01.02" }}",
|
||||||
|
"tags": {{ $page.Params.tags | jsonify }}
|
||||||
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,20 @@
|
||||||
{{ .Render "item" }}
|
{
|
||||||
|
"id": "{{ .Permalink }}",
|
||||||
|
"url": "{{ .Permalink }}",
|
||||||
|
"title": {{ .Title | jsonify }},
|
||||||
|
"authors": [
|
||||||
|
{{with $.Site.Author.name }}
|
||||||
|
{ "name": "{{ . }}" }
|
||||||
|
{{ end }}
|
||||||
|
],
|
||||||
|
"content_html": {{ .Content | jsonify }},
|
||||||
|
"date_published": "{{ .Date.Format "2006.01.02" }}",
|
||||||
|
"tags": {{ .Params.tags | jsonify }},
|
||||||
|
"_syndication": {
|
||||||
|
"mastodon": {
|
||||||
|
"enabled": {{ .Params.mastodon_enabled | default "false" }},
|
||||||
|
"toot_id": {{ .Params.mastodon_toot_id | default "null" }}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue