- commit
- 30b695c
- parent
- ee3ffda
- author
- Eric Bower
- date
- 2025-05-13 12:04:26 -0400 EDT
fix(prose): use now for post not found updated at
1 files changed,
+6,
-4
+6,
-4
1@@ -467,16 +467,18 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
2 contents = template.HTML(notFoundParsed.Html)
3 }
4
5+ now := time.Now()
6+
7 data = PostPageData{
8 Site: *cfg.GetSiteData(),
9 BlogURL: template.URL(cfg.FullBlogURL(curl, username)),
10 PageTitle: title,
11 Description: desc,
12 Title: title,
13- PublishAt: time.Now().Format(time.DateOnly),
14- PublishAtISO: time.Now().Format(time.RFC3339),
15- UpdatedAt: post.UpdatedAt.Format(time.DateOnly),
16- UpdatedAtISO: post.UpdatedAt.Format(time.RFC3339),
17+ PublishAt: now.Format(time.DateOnly),
18+ PublishAtISO: now.Format(time.RFC3339),
19+ UpdatedAt: now.Format(time.DateOnly),
20+ UpdatedAtISO: now.Format(time.RFC3339),
21 Username: username,
22 BlogName: blogName,
23 HasCSS: hasCSS,