From c59029cf3db59e345f225aac45ea176a230d1b91 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Fri, 1 Nov 2024 16:22:31 +0100 Subject: [PATCH] Add rel="self" to Atom feed --- cmd/backend/atom.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/backend/atom.go b/cmd/backend/atom.go index 6133818..5db78ae 100644 --- a/cmd/backend/atom.go +++ b/cmd/backend/atom.go @@ -12,7 +12,9 @@ func GenerateAtomFeed(c *Config, db *DB) (*string, error) { feed := atom.NewFeed(c.Title) feed.ID = atom.NewID("urn:feed:1") feed.Subtitle = atom.NewText("text", c.Description) - feed.AddLink(atom.NewLink(c.Link)) + + linkID := feed.AddLink(atom.NewLink(c.Link)) + feed.Links[linkID].Rel = "self" feed.Generator = atom.NewGenerator("cpolis") feed.Generator.URI = "https://git.streifling.com/jason/cpolis"