code: func DecodeTypes(mms ...map[string]interface{}) (Types, error) {
  	var m Types
  
  	// Maps type string to Type. Type string is the full application/svg+xml.
  	mmm := make(map[string]Type)
  	for _, dt := range DefaultTypes {
  		suffixes := make([]string, len(dt.Suffixes))
  		copy(suffixes, dt.Suffixes)
  		dt.Suffixes = suffixes
  		mmm[dt.Type()] = dt
  	}
  
  	for _, mm := range mms {
  		for k, v := range mm {
  			var mediaType Type
  
  			mediaType, found := mmm[k]
  			if !found {
  				var err error
  				mediaType, err = fromString(k)
  				if err != nil {
  					return m, err
  				}
  			}
  
  			if err := mapstructure.WeakDecode(v, &mediaType); err != nil {
  				return m, err
  			}
  
  			vm := v.(map[string]interface{})
  			maps.ToLower(vm)
  			_, delimiterSet := vm["delimiter"]
  			_, suffixSet := vm["suffix"]
  
  			if suffixSet {
  				return Types{}, suffixIsRemoved()
  			}
  
  			// The user may set the delimiter as an empty string.
  			if !delimiterSet && len(mediaType.Suffixes) != 0 {
  				mediaType.Delimiter = defaultDelimiter
  			}
  
  			mmm[k] = mediaType
  
  		}
  	}
  
  	for _, v := range mmm {
  		m = append(m, v)
  	}
  	sort.Sort(m)
  
  	return m, nil
  }
docs: // DecodeTypes takes a list of media type configurations and merges those,
  // in the order given, with the Hugo defaults as the last resort.