From 0a76bfbedcf67317ce76ce39008de229f950edab Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Wed, 4 Mar 2020 09:28:38 +0100 Subject: [PATCH] Fix and improve post representation --- layouts/_default/single.activity.ajson | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/layouts/_default/single.activity.ajson b/layouts/_default/single.activity.ajson index 983e5b0..b07147d 100644 --- a/layouts/_default/single.activity.ajson +++ b/layouts/_default/single.activity.ajson @@ -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 }}" } \ No newline at end of file