mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
config: Add mediatypes section
This commit is contained in:
parent
faae5cc44d
commit
b6bc412de4
|
@ -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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue