Add rel="self" to Atom feed

This commit is contained in:
Jason Streifling 2024-11-01 16:22:31 +01:00
parent ac740cf4b8
commit c59029cf3d

View File

@ -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"