From 13b9b8c520a65e99a6db3e1a8a35f909f3b8c7f7 Mon Sep 17 00:00:00 2001 From: adnano Date: Sat, 27 Feb 2021 21:42:37 -0500 Subject: [PATCH] page: Don't hardcode .gmi file extension --- page.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page.go b/page.go index d2d341b..afe6fb2 100644 --- a/page.go +++ b/page.go @@ -56,7 +56,7 @@ func NewPage(path string, content []byte) *Page { } // Remove extension from path - page.Path = "/" + strings.TrimSuffix(path, ".gmi") + "/" + page.Path = "/" + strings.TrimSuffix(path, pathpkg.Ext(path)) + "/" page.Content = string(content) return &page }