mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
media: Add DecodeTypes
And clean up the media package.
This commit is contained in:
@@ -216,9 +216,9 @@ func (formats Formats) FromFilename(filename string) (f Format, found bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// DecodeOutputFormats takes a list of output format configurations and merges those,
|
||||
// DecodeFormats takes a list of output format configurations and merges those,
|
||||
// in ther order given, with the Hugo defaults as the last resort.
|
||||
func DecodeOutputFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Formats, error) {
|
||||
func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Formats, error) {
|
||||
f := make(Formats, len(DefaultFormats))
|
||||
copy(f, DefaultFormats)
|
||||
|
||||
|
Reference in New Issue
Block a user