1
0
Fork 0
mirror of https://github.com/vbatts/sl-feeds.git synced 2024-11-22 15:55:39 +00:00

feed: Id needs to be an URL

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-02-09 14:51:26 -05:00
parent b48b01f8eb
commit 92a58c4314
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -30,11 +30,12 @@ func ToFeed(link string, entries []Entry) (*feeds.Feed, error) {
} }
feed.Items = make([]*feeds.Item, len(entries)) feed.Items = make([]*feeds.Item, len(entries))
for i, e := range entries { for i, e := range entries {
url := fmt.Sprintf("%s/ChangeLog.txt#src=feeds&time=%d", link, e.Date.Unix())
feed.Items[i] = &feeds.Item{ feed.Items[i] = &feeds.Item{
Created: e.Date, Created: e.Date,
Link: &feeds.Link{Href: fmt.Sprintf("%s/ChangeLog.txt#src=feeds&time=%d", link, e.Date.Unix())}, Link: &feeds.Link{Href: url},
Description: e.ToHTML(), Description: e.ToHTML(),
Id: fmt.Sprintf("%d", e.Date.Unix()), Id: url,
} }
updateWord := "updates" updateWord := "updates"