hugolib: Read media types and output formats from site config

Closes #3222
Closes #3223
This commit is contained in:
Bjørn Erik Pedersen
2017-04-04 09:12:33 +02:00
parent f8d555cca5
commit 10ff2f31a6
3 changed files with 57 additions and 15 deletions

View File

@@ -909,7 +909,7 @@ func (p *Page) update(f interface{}) error {
o := cast.ToStringSlice(v)
if len(o) > 0 {
// Output formats are exlicitly set in front matter, use those.
outFormats, err := output.DefaultFormats.GetByNames(o...)
outFormats, err := p.s.outputFormatsConfig.GetByNames(o...)
if err != nil {
p.s.Log.ERROR.Printf("Failed to resolve output formats: %s", err)