diff options
| -rw-r--r-- | cmd/web/handlers/export.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/web/handlers/export.go b/cmd/web/handlers/export.go index becdae8..83309d8 100644 --- a/cmd/web/handlers/export.go +++ b/cmd/web/handlers/export.go @@ -18,6 +18,7 @@ type Item struct { XMLName xml.Name `xml:"item"` Title string `xml:"title"` Link string `xml:"link"` + Guid string `xml:"guid"` Description string `xml:"description"` PubDate string `xml:"pubDate"` Content string `xml:"content:encoded"` @@ -41,7 +42,7 @@ type rssExportContext struct { func (ctx *rssExportContext) feed(w http.ResponseWriter, r *http.Request) { feed := &Channel{ Title: "Paterissa", - Link: ctx.serv, + Link: "https://" + ctx.serv, Description: "Blog feed", } @@ -64,7 +65,7 @@ func (ctx *rssExportContext) feed(w http.ResponseWriter, r *http.Request) { return } - p.FormattedTime = p.Time.Format(time.ANSIC) + p.FormattedTime = p.Time.Format(time.RFC822) title := "" z := html.NewTokenizer(strings.NewReader(string(p.Brief))) @@ -90,7 +91,8 @@ func (ctx *rssExportContext) feed(w http.ResponseWriter, r *http.Request) { feed.Items = append(feed.Items, Item{ Title: title, - Link: ctx.serv + "/post?id=" + strconv.Itoa(p.Id), + Link: "https://" + ctx.serv + "/post?id=" + strconv.Itoa(p.Id), + Guid: "https://" + ctx.serv + "/post?id=" + strconv.Itoa(p.Id), Description: brief, PubDate: p.FormattedTime, Content: content, |
