aboutsummaryrefslogtreecommitdiff
path: root/route.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-25 10:35:40 +0000
committerFuwn <[email protected]>2021-07-25 10:35:40 +0000
commitc4b90345c444081e5dd2ca6b41c55bb048dfc563 (patch)
treeabf1eeabb14e45072a44b84922ef1d2d0b222fb6 /route.go
parentfix(route): don't title case non-date blog posts (diff)
downloadspace-c4b90345c444081e5dd2ca6b41c55bb048dfc563.tar.xz
space-c4b90345c444081e5dd2ca6b41c55bb048dfc563.zip
fix(route): path capitalization on nodate routes
Diffstat (limited to 'route.go')
-rw-r--r--route.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/route.go b/route.go
index cda3f2d..7809735 100644
--- a/route.go
+++ b/route.go
@@ -25,7 +25,7 @@ func createRoute(route string, template string, content string) {
g.Handle(route, func(c gig.Context) error {
return c.Render(template, IndexTemplate{
- Content: GetContent(content),
+ Content: utilities.TrimLastChar(GetContent(content)),
Quote: utilities.GetRandomQuote(),
Hits: database.Get(route),
/* SystemInfo: fmt.Sprintf(
@@ -119,6 +119,7 @@ func createBlogRoute(baseRoute string, postPath string, name string, reverse boo
case noDateNoShow:
postTitle = fileNameNoExt
+ fileNameNoExt = strings.ToLower(fileNameNoExt)
}
files += fmt.Sprintf("=> %s %s\n", baseRoute+"/"+fileNameNoExt, postTitle)