summaryrefslogtreecommitdiffstats
path: root/hugolib/site.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/site.go')
-rw-r--r--hugolib/site.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/hugolib/site.go b/hugolib/site.go
index a749bafd0..5e300393b 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -586,8 +586,9 @@ type whatChanged struct {
// package, so it will behave correctly with Hugo's built-in server.
func (s *Site) RegisterMediaTypes() {
for _, mt := range s.mediaTypesConfig {
- // The last one will win if there are any duplicates.
- _ = mime.AddExtensionType("."+mt.Suffix, mt.Type()+"; charset=utf-8")
+ for _, suffix := range mt.Suffixes {
+ _ = mime.AddExtensionType(mt.Delimiter+suffix, mt.Type()+"; charset=utf-8")
+ }
}
}