Fix and improve post representation
This commit is contained in:
parent
d18e85c12c
commit
0a76bfbedc
|
@ -2,9 +2,17 @@
|
||||||
"@context": [
|
"@context": [
|
||||||
"https://www.w3.org/ns/activitystreams"
|
"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 }},
|
"content": {{ (htmlUnescape .Content | safeHTML) | jsonify }},
|
||||||
"summary": {{ (htmlUnescape .Summary | safeHTML) | jsonify }},
|
|
||||||
{{- if .Params.images }}
|
{{- if .Params.images }}
|
||||||
"attachment": [
|
"attachment": [
|
||||||
{{ $delimiter := "" -}}
|
{{ $delimiter := "" -}}
|
||||||
|
@ -28,7 +36,5 @@
|
||||||
"updated": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
|
"updated": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
|
||||||
"id": "{{ .Permalink }}",
|
"id": "{{ .Permalink }}",
|
||||||
"url": "{{ .Permalink }}",
|
"url": "{{ .Permalink }}",
|
||||||
"type": "Article",
|
"attributedTo": "{{ "" | absLangURL }}"
|
||||||
"attributedTo": "{{ "" | absLangURL }}",
|
|
||||||
"to": ["https://www.w3.org/ns/activitystreams#Public"]
|
|
||||||
}
|
}
|
Reference in New Issue