From 6c55840690feb4d89e757f18c9d7b89cb354a2b0 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 2 Feb 2020 18:44:12 -0500 Subject: [PATCH] add images to rss feeds --- web.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web.go b/web.go index 24cb5cc..bb007c6 100644 --- a/web.go +++ b/web.go @@ -215,7 +215,10 @@ func showrss(w http.ResponseWriter, r *http.Request) { } for _, d := range honk.Donks { desc += string(templates.Sprintf(`

Attachment: %s`, - d.URL, d.Name)) + d.URL, d.Desc)) + if strings.HasPrefix(d.Media, "image") { + desc += string(templates.Sprintf(``, d.URL)) + } } feed.Items = append(feed.Items, &rss.Item{