1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-11-08 14:19:20 +01:00

config: Add mediatypes section

This commit is contained in:
adnano 2021-02-27 21:45:37 -05:00
parent 13b9b8c520
commit abfd442ab5

@ -1,6 +1,7 @@
package main
import (
"mime"
"os"
"strings"
"text/template"
@ -42,6 +43,10 @@ func (c *Config) Load(path string) error {
}
case "feeds":
c.Feeds[key] = value
case "mediatypes":
for _, field := range strings.Fields(value) {
mime.AddExtensionType(key, field)
}
}
})
}