mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-11-27 12:06:11 +00:00
config: Add mediatypes section
This commit is contained in:
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue