1
Fork 0

Fix and improve post representation

This commit is contained in:
Jan-Lukas Else 2020-03-04 09:28:38 +01:00
parent d18e85c12c
commit 0a76bfbedc
1 changed files with 11 additions and 5 deletions

View File

@ -2,9 +2,17 @@
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"title": {{ (htmlUnescape .Title | safeHTML) | jsonify }},
"to": ["https://www.w3.org/ns/activitystreams#Public"],
{{- if .Param "indieweb.reply.link" }}
"inReplyTo": "{{ .Param "indieweb.reply.link" }}",
{{ end -}}
{{- if .Title }}
"name": {{ (htmlUnescape .Title | safeHTML) | jsonify }},
"type": "Article",
{{- else -}}
"type": "Note",
{{ end -}}
"content": {{ (htmlUnescape .Content | safeHTML) | jsonify }},
"summary": {{ (htmlUnescape .Summary | safeHTML) | jsonify }},
{{- if .Params.images }}
"attachment": [
{{ $delimiter := "" -}}
@ -28,7 +36,5 @@
"updated": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
"id": "{{ .Permalink }}",
"url": "{{ .Permalink }}",
"type": "Article",
"attributedTo": "{{ "" | absLangURL }}",
"to": ["https://www.w3.org/ns/activitystreams#Public"]
"attributedTo": "{{ "" | absLangURL }}"
}