mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
target: Simplify
This commit is contained in:
@@ -104,9 +104,7 @@ func (h *HTMLRedirectAlias) Translate(alias string) (aliasPath string, err error
|
||||
}
|
||||
|
||||
// Add the final touch
|
||||
if strings.HasPrefix(alias, helpers.FilePathSeparator) {
|
||||
alias = alias[1:]
|
||||
}
|
||||
alias = strings.TrimPrefix(alias, helpers.FilePathSeparator)
|
||||
if strings.HasSuffix(alias, helpers.FilePathSeparator) {
|
||||
alias = alias + "index.html"
|
||||
} else if !strings.HasSuffix(alias, ".html") {
|
||||
|
Reference in New Issue
Block a user