2020-02-10 16:48:50 +00:00
|
|
|
{
|
|
|
|
"@context": [
|
|
|
|
"https://www.w3.org/ns/activitystreams"
|
|
|
|
],
|
2020-03-04 08:28:38 +00:00
|
|
|
"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 -}}
|
2020-06-23 18:50:19 +00:00
|
|
|
"content": {{ .Content | jsonify }},
|
2020-02-19 11:32:05 +00:00
|
|
|
{{- if .Params.images }}
|
|
|
|
"attachment": [
|
|
|
|
{{ $delimiter := "" -}}
|
|
|
|
{{ range .Params.images }}
|
|
|
|
{{- $delimiter -}}{
|
|
|
|
"type": "Image",
|
|
|
|
"url": "{{ . }}",
|
|
|
|
{{ $lowerUrl := lower . -}}
|
|
|
|
{{- if or ( strings.HasSuffix $lowerUrl "jpg" ) ( strings.HasSuffix $lowerUrl "jpeg" ) -}}
|
|
|
|
"mediaType": "image/jpeg"
|
|
|
|
{{- else -}}
|
|
|
|
"mediaType": "image/png"
|
|
|
|
{{- end }}
|
|
|
|
}
|
|
|
|
{{- $delimiter = "," -}}
|
|
|
|
{{ end }}
|
|
|
|
],
|
|
|
|
{{ end -}}
|
|
|
|
"mediaType": "text/html",
|
2020-02-10 16:48:50 +00:00
|
|
|
"published": {{ dateFormat "2006-01-02T15:04:05-07:00" .Lastmod | jsonify }},
|
|
|
|
"updated": {{ dateFormat "2006-01-02T15:04:05-07:00" .Date | jsonify }},
|
|
|
|
"id": "{{ .Permalink }}",
|
|
|
|
"url": "{{ .Permalink }}",
|
2020-03-04 08:28:38 +00:00
|
|
|
"attributedTo": "{{ "" | absLangURL }}"
|
2020-02-10 16:48:50 +00:00
|
|
|
}
|