1
Fork 0
This commit is contained in:
Jan-Lukas Else 2020-02-10 17:48:50 +01:00
commit 0a2d91d414
4 changed files with 55 additions and 0 deletions

11
config.yaml Normal file
View File

@ -0,0 +1,11 @@
outputFormats:
activity:
mediaType: "application/activity+json"
baseName: "index"
isPlainText: true
notAlternative: true
mediaTypes:
application/activity+json:
suffixes:
- ajson

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module codeberg.org/jlelse/hugo-activitystreams
go 1.13

View File

@ -0,0 +1,26 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"id": "{{ "" | absLangURL }}",
"type": "Person",
"name": {{ .Site.Title | jsonify }},
"summary": {{ .Site.Params.description | jsonify }},
"preferredUsername": "{{ .Site.Language.Lang }}"
{{ with .Site.Author.avatar -}}
,"icon": {
"type": "Image",
"url": "{{ . | absURL }}"
}
{{- end }}
{{ with .Site.Params.activitypub.inbox -}}
,"inbox": "{{ . }}"
{{- end }}
{{ with .Site.Params.activitypub.publickeypem -}}
,"publicKey": {
"id": "{{ "" | absLangURL }}#main-key",
"owner": "{{ "" | absLangURL }}",
"publicKeyPem": "{{ . }}"
}
{{- end }}
}

View File

@ -0,0 +1,15 @@
{
"@context": [
"https://www.w3.org/ns/activitystreams"
],
"title": {{ .Title | jsonify }},
"content_html": {{ .Content | jsonify }},
"summary": {{ .Summary | jsonify }},
"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 }}",
"type": "Article",
"attributedTo": "{{ "" | absLangURL }}",
"to": ["https://www.w3.org/ns/activitystreams#Public"]
}