36 lines
701 B
Text
36 lines
701 B
Text
|
{{ with .OutputFormats.Get "as2" }}
|
||
|
{{ $type := slice "Page" }}
|
||
|
{
|
||
|
"@context": "https://www.w3.org/ns/activitystreams"
|
||
|
{{- with .Permalink }},
|
||
|
"id": "{{ . }}"
|
||
|
{{- end }}
|
||
|
{{- with $type }}
|
||
|
{{- if eq (. | len) 1 }},
|
||
|
"type": "{{index . 0}}"
|
||
|
{{- else }},
|
||
|
"type": {{ . | jsonify }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- if $.Params.title }}
|
||
|
{{- with $.Title | jsonify }},
|
||
|
"name": {{.}}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- if $.Params.summary }}
|
||
|
{{- with $.Summary | jsonify }},
|
||
|
"summary": {{.}}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- with $.Permalink }},
|
||
|
"url": {
|
||
|
"href": "{{.}}"
|
||
|
{{- with $.Language }},
|
||
|
"hreflang": "{{.}}"
|
||
|
{{- end }},
|
||
|
"rel": "canonical",
|
||
|
"mediaType": "text/html"
|
||
|
}
|
||
|
{{- end }}
|
||
|
}
|
||
|
{{ end }}
|