From be791111df7d8321ba0b147aa8dba5bdd16d383b Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 3 Dec 2023 07:34:04 -0800 Subject: [PATCH] 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. --- layouts/_default/list.atom.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index 82c53a4..894167c 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -23,7 +23,6 @@ xmlns:ostatus="http://ostatus.org/schema/1.0" xmlns:poco="http://portablecontacts.net/spec/1.0" 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:thr="http://purl.org/syndication/thread/1.0" xmlns:webfeeds="http://webfeeds.org/rss/1.0"> @@ -73,13 +72,14 @@ Copyright © {{ now.Year }} Rohan Kumar {{- with .Params.replyURI -}} - + + {{- end -}} {{- with .Params.replyAuthorURI -}} {{- end -}} {{- $type := "article" -}} - {{- if eq .Section "notes" -}} + {{- if eq .Section "notes" -}}{{ /* TODO: add bookmark type and convert bookmarks to their own post types. */ -}} {{- $type = "note" -}} {{- end -}} http://activitystrea.ms/schema/1.0/{{ $type }} @@ -99,7 +99,9 @@ {{ partial "processed-content.html" . | replaceRE `(?: )?(?:item(type|scope|prop|id|ref)="[^"]*"|class="language-figure")` "" | replaceRE `` "" | safeHTML -}} - {{ .Page.Scratch.Get "webmentionCount" }} + {{- /* TODO: add application/atom+xml version of comments. */ }} + + {{ .Page.Scratch.Get "webmentionCount" }} {{ end -}} {{- end }}