mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
@@ -219,7 +219,12 @@ func (formats Formats) FromFilename(filename string) (f Format, found bool) {
|
||||
}
|
||||
|
||||
if ext != "" {
|
||||
return formats.GetBySuffix(ext)
|
||||
f, found = formats.GetBySuffix(ext)
|
||||
if !found && len(parts) == 2 {
|
||||
// For extensionless output formats (e.g. Netlify's _redirects)
|
||||
// we must fall back to using the extension as format lookup.
|
||||
f, found = formats.GetByName(ext)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user