mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Improve use of threading extensions in Atom feeds
- Add content-type metadata - Follow recommendation to add rel-related links for unsupported clients - Replace slash:comments with rel-replies containing thr:count metadata and thr:total elements.
This commit is contained in:
parent
da534b27a3
commit
be791111df
1 changed files with 6 additions and 4 deletions
|
@ -23,7 +23,6 @@
|
||||||
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
xmlns:ostatus="http://ostatus.org/schema/1.0"
|
||||||
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
xmlns:poco="http://portablecontacts.net/spec/1.0"
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
|
||||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||||
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
xmlns:thr="http://purl.org/syndication/thread/1.0"
|
||||||
xmlns:webfeeds="http://webfeeds.org/rss/1.0">
|
xmlns:webfeeds="http://webfeeds.org/rss/1.0">
|
||||||
|
@ -73,13 +72,14 @@
|
||||||
<rights type="text">Copyright © {{ now.Year }} Rohan Kumar</rights>
|
<rights type="text">Copyright © {{ now.Year }} Rohan Kumar</rights>
|
||||||
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
|
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
|
||||||
{{- with .Params.replyURI -}}
|
{{- with .Params.replyURI -}}
|
||||||
<thr:in-reply-to ref="{{ . }}" href="{{ . }}" />
|
<thr:in-reply-to ref="{{ . }}" href="{{ . }}" type="text/html" />
|
||||||
|
<link rel="related" type="text/html" href="{{ . }}" />
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Params.replyAuthorURI -}}
|
{{- with .Params.replyAuthorURI -}}
|
||||||
<link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person" href="{{ . }}"/>
|
<link rel="mentioned" ostatus:object-type="http://activitystrea.ms/schema/1.0/person" href="{{ . }}"/>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $type := "article" -}}
|
{{- $type := "article" -}}
|
||||||
{{- if eq .Section "notes" -}}
|
{{- if eq .Section "notes" -}}{{ /* TODO: add bookmark type and convert bookmarks to their own post types. */ -}}
|
||||||
{{- $type = "note" -}}
|
{{- $type = "note" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
|
<activity:object-type>http://activitystrea.ms/schema/1.0/{{ $type }}</activity:object-type>
|
||||||
|
@ -99,7 +99,9 @@
|
||||||
{{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `<meta content="true" ?/>` "" | safeHTML -}}
|
{{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `<meta content="true" ?/>` "" | safeHTML -}}
|
||||||
</div>
|
</div>
|
||||||
</content>
|
</content>
|
||||||
<slash:comments>{{ .Page.Scratch.Get "webmentionCount" }}</slash:comments>
|
{{- /* TODO: add application/atom+xml version of comments. */ }}
|
||||||
|
<link rel="replies" type="text/html" href="{{ .Permalink }}#webmentions" thr:count="{{ .Page.Scratch.Get "webmentionCount" }}" />
|
||||||
|
<thr:total>{{ .Page.Scratch.Get "webmentionCount" }}</thr:total>
|
||||||
</entry>
|
</entry>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue