mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
config: Remove mediatypes
This commit is contained in:
parent
d7e9f5e7c2
commit
6e7575fdc2
|
@ -1,7 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mime"
|
|
||||||
"os"
|
"os"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
|
@ -13,7 +12,6 @@ type Config struct {
|
||||||
Title string `toml:"title"` // site title
|
Title string `toml:"title"` // site title
|
||||||
URLs []string `toml:"urls"` // site URLs
|
URLs []string `toml:"urls"` // site URLs
|
||||||
Feeds map[string]string `toml:"feeds"` // site feeds
|
Feeds map[string]string `toml:"feeds"` // site feeds
|
||||||
Mediatypes map[string][]string `toml:"mediatypes"` // mediatypes
|
|
||||||
Templates *Templates `toml:"-"` // site templates
|
Templates *Templates `toml:"-"` // site templates
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,13 +28,6 @@ func LoadConfig(path string) (*Config, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register media types
|
|
||||||
for typ, exts := range c.Mediatypes {
|
|
||||||
for _, ext := range exts {
|
|
||||||
mime.AddExtensionType(typ, ext)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return c, nil
|
return c, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue