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:
parent
e3a479f921
commit
13b9b8c520
2
page.go
2
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user