code: func DecodeFormats(mediaTypes media.Types, maps ...map[string]interface{}) (Formats, error) {
  	f := make(Formats, len(DefaultFormats))
  	copy(f, DefaultFormats)
  
  	for _, m := range maps {
  		for k, v := range m {
  			found := false
  			for i, vv := range f {
  				if strings.EqualFold(k, vv.Name) {
  					// Merge it with the existing
  					if err := decode(mediaTypes, v, &f[i]); err != nil {
  						return f, err
  					}
  					found = true
  				}
  			}
  			if !found {
  				var newOutFormat Format
  				newOutFormat.Name = k
  				if err := decode(mediaTypes, v, &newOutFormat); err != nil {
  					return f, err
  				}
  
  				// We need values for these
  				if newOutFormat.BaseName == "" {
  					newOutFormat.BaseName = "index"
  				}
  				if newOutFormat.Rel == "" {
  					newOutFormat.Rel = "alternate"
  				}
  
  				f = append(f, newOutFormat)
  			}
  		}
  	}
  
  	sort.Sort(f)
  
  	return f, nil
  }
docs: // DecodeFormats takes a list of output format configurations and merges those,
  // in the order given, with the Hugo defaults as the last resort.