all repos — honk @ ac5fb453bcc92c06c60f239a6a67b2a09d0641c9

my fork of honk

add images to rss feeds
Ted Unangst tedu@tedunangst.com
Sun, 02 Feb 2020 18:44:12 -0500
commit

ac5fb453bcc92c06c60f239a6a67b2a09d0641c9

parent

d454707124f456ae0cae07600ff5ff7ab41cac7a

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M web.goweb.go

@@ -215,7 +215,10 @@ p.Url, p.Name, p.Latitude, p.Longitude))

} for _, d := range honk.Donks { desc += string(templates.Sprintf(`<p><a href="%s">Attachment: %s</a>`, - d.URL, d.Name)) + d.URL, d.Desc)) + if strings.HasPrefix(d.Media, "image") { + desc += string(templates.Sprintf(`<img src="%s">`, d.URL)) + } } feed.Items = append(feed.Items, &rss.Item{