mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-24 00:56:34 -05:00
Added activitystream2
This commit is contained in:
parent
60bb02b220
commit
8513bece81
1 changed files with 28 additions and 0 deletions
28
layouts/_default/list.as2.ajson
Normal file
28
layouts/_default/list.as2.ajson
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"items": [{{ range $index, $page := .Pages }}{{ if ne $index 0 }},{{ end }}
|
||||||
|
{
|
||||||
|
"@context": "https://www.w3.org/ns/activitystreams",
|
||||||
|
"actor": {
|
||||||
|
{{with $.Site.Author.name }}"name": "{{ . }}",{{ end }}
|
||||||
|
"url": "{{ .Site.BaseURL }}"
|
||||||
|
},
|
||||||
|
"id": "{{ $page.Permalink }}",
|
||||||
|
"object": {
|
||||||
|
"attributedTo": [
|
||||||
|
{
|
||||||
|
{{with $.Site.Author.name }}"name": "{{ . }}",{{ end }}
|
||||||
|
"type": "Person",
|
||||||
|
"url": "{{ .Site.BaseURL }}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"content": {{ $page.Content | jsonify }},
|
||||||
|
"id": "{{ $page.Permalink }}",
|
||||||
|
"name": {{ $page.Title | jsonify }},
|
||||||
|
"published": {{ $page.Date.Format "2006.01.02" | jsonify }},
|
||||||
|
"tag": {{ $page.Params.tags | jsonify }},
|
||||||
|
"type": "Article",
|
||||||
|
"url": "{{ $page.Permalink }}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{ end }}]
|
||||||
|
}
|
Loading…
Reference in a new issue