Optional RSS item link (#96)

This commit is contained in:
Jáchym Toušek
2022-11-15 18:05:42 +01:00
committed by GitHub
parent 6f6e20dd39
commit 23a1360214
+3 -1
View File
@@ -95,11 +95,13 @@ type Rss struct {
func newRssItem(i *Item) *RssItem {
item := &RssItem{
Title: i.Title,
Link: i.Link.Href,
Description: i.Description,
Guid: i.Id,
PubDate: anyTimeFormat(time.RFC1123Z, i.Created, i.Updated),
}
if i.Link != nil {
item.Link = i.Link.Href
}
if len(i.Content) > 0 {
item.Content = &RssContent{Content: i.Content}
}