diff --git a/caddyhttp/markdown/markdown.go b/caddyhttp/markdown/markdown.go index 933e5af7..d48561a6 100644 --- a/caddyhttp/markdown/markdown.go +++ b/caddyhttp/markdown/markdown.go @@ -167,5 +167,5 @@ func latest(t ...time.Time) time.Time { // title gives a backup generated title for a page func title(p string) string { - return strings.TrimRight(path.Base(p), path.Ext(p)) + return strings.TrimSuffix(path.Base(p), path.Ext(p)) }