1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-11-08 14:19:20 +01:00

page: Don't hardcode .gmi file extension

This commit is contained in:
adnano 2021-02-27 21:42:37 -05:00
parent e3a479f921
commit 13b9b8c520

@ -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
}