Fix and improve post representation
This commit is contained in:
parent
d18e85c12c
commit
0a76bfbedc
|
@ -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 }}"
|
||||
}
|
Reference in New Issue