Skip to content

Commit

Permalink
Make /page/ URLs trailing-slash agnostic.
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Nov 26, 2023
1 parent 111dac8 commit a0578f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/dictpress/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func handleGlossaryPage(c echo.Context) error {
func handleStaticPage(c echo.Context) error {
var (
app = c.Get("app").(*App)
id = "page-" + c.Param("page")
id = "page-" + strings.TrimRight(c.Param("page"), "/")
)

if app.siteTpl.Lookup(id) == nil {
Expand Down

0 comments on commit a0578f1

Please sign in to comment.