mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
media: Add missing BMP and GIF to the default MediaTypes list
This commit is contained in:
@@ -274,6 +274,8 @@ var DefaultTypes = Types{
|
||||
YAMLType,
|
||||
TOMLType,
|
||||
PNGType,
|
||||
GIFType,
|
||||
BMPType,
|
||||
JPEGType,
|
||||
WEBPType,
|
||||
AVIType,
|
||||
@@ -289,6 +291,15 @@ var DefaultTypes = Types{
|
||||
|
||||
func init() {
|
||||
sort.Sort(DefaultTypes)
|
||||
|
||||
// Sanity check.
|
||||
seen := make(map[Type]bool)
|
||||
for _, t := range DefaultTypes {
|
||||
if seen[t] {
|
||||
panic(fmt.Sprintf("MediaType %s duplicated in list", t))
|
||||
}
|
||||
seen[t] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Types is a slice of media types.
|
||||
|
Reference in New Issue
Block a user