- commit
- 39dcc8a
- parent
- 1140144
- author
- Eric Bower
- date
- 2022-08-04 00:11:56 +0000 UTC
feat(pastes): use post filename for the title
1 files changed,
+3,
-3
+3,
-3
1@@ -118,7 +118,7 @@ func blogHandler(w http.ResponseWriter, r *http.Request) {
2 p := PostItemData{
3 URL: template.URL(cfg.FullPostURL(post.Username, post.Slug, onSubdomain, withUserName)),
4 BlogURL: template.URL(cfg.FullBlogURL(post.Username, onSubdomain, withUserName)),
5- Title: shared.FilenameToTitle(post.Filename, post.Title),
6+ Title: post.Filename,
7 PublishAt: post.PublishAt.Format("02 Jan, 2006"),
8 PublishAtISO: post.PublishAt.Format(time.RFC3339),
9 UpdatedTimeAgo: shared.TimeAgo(post.UpdatedAt),
10@@ -190,12 +190,12 @@ func postHandler(w http.ResponseWriter, r *http.Request) {
11
12 data = PostPageData{
13 Site: *cfg.GetSiteData(),
14- PageTitle: GetPostTitle(post),
15+ PageTitle: post.Filename,
16 URL: template.URL(cfg.PostURL(post.Username, post.Slug)),
17 RawURL: template.URL(cfg.RawPostURL(post.Username, post.Slug)),
18 BlogURL: template.URL(cfg.BlogURL(username)),
19 Description: post.Description,
20- Title: shared.FilenameToTitle(post.Filename, post.Title),
21+ Title: post.Filename,
22 PublishAt: post.PublishAt.Format("02 Jan, 2006"),
23 PublishAtISO: post.PublishAt.Format(time.RFC3339),
24 Username: username,