repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
1255faf
parent
327b26e
author
Eric Bower
date
2023-08-19 15:11:37 +0000 UTC
chore(prose): updated blog rss feeds
1 files changed,  +5, -4
M prose/api.go
+5, -4
 1@@ -630,13 +630,15 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
 2 	}
 3 
 4 	curl := shared.CreateURLFromRequest(cfg, r)
 5+	blogUrl := cfg.FullBlogURL(curl, username)
 6 
 7 	feed := &feeds.Feed{
 8+		Id:          blogUrl,
 9 		Title:       headerTxt.Title,
10-		Link:        &feeds.Link{Href: cfg.FullBlogURL(curl, username)},
11+		Link:        &feeds.Link{Href: fmt.Sprintf("%s/rss", blogUrl)},
12 		Description: headerTxt.Bio,
13 		Author:      &feeds.Author{Name: username},
14-		Created:     time.Now(),
15+		Created:     *user.CreatedAt,
16 	}
17 
18 	var feedItems []*feeds.Item
19@@ -675,8 +677,7 @@ func rssBlogHandler(w http.ResponseWriter, r *http.Request) {
20 			Title:       shared.FilenameToTitle(post.Filename, post.Title),
21 			Link:        &feeds.Link{Href: realUrl},
22 			Content:     tpl.String(),
23-			Created:     *post.PublishAt,
24-			Updated:     *post.UpdatedAt,
25+			Created:     *post.CreatedAt,
26 			Description: post.Description,
27 		}
28