mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
output: Add output formats decoder
And clean up the output package.
This commit is contained in:
parent
d6e8b86f66
commit
c9aee467d3
6 changed files with 281 additions and 91 deletions
|
@ -40,7 +40,7 @@ func createSiteOutputFormats(cfg config.Provider) (map[string]output.Formats, er
|
|||
var formats output.Formats
|
||||
vals := cast.ToStringSlice(v)
|
||||
for _, format := range vals {
|
||||
f, found := output.GetFormat(format)
|
||||
f, found := output.DefaultFormats.GetByName(format)
|
||||
if !found {
|
||||
return nil, fmt.Errorf("Failed to resolve output format %q from site config", format)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue