Skip to content

Commit

Permalink
Optional RSS item link (gorilla#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag authored and jlelse committed Jul 7, 2023
1 parent 189f942 commit 73249b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
Expand Down

0 comments on commit 73249b8

Please sign in to comment.