Remove default 'gemini' task

This commit is contained in:
adnano 2021-04-20 16:16:12 -04:00
parent 133b371e4c
commit 95839fcf4c

View file

@ -49,21 +49,6 @@ func (t Task) Format(p *Page) (string, []byte) {
return path, []byte(p.Content) return path, []byte(p.Content)
} }
// DefaultConfig returns the default configuration.
func DefaultConfig() *Config {
c := new(Config)
c.Feeds = make(map[string]string)
c.Tasks = make(map[string]*Task)
c.Tasks["gemini"] = &Task{
InputExt: ".gmi",
OutputExt: ".gmi",
TemplateExt: ".gmi",
StaticDir: "static",
OutputDir: "public",
}
return c
}
// LoadConfig loads the configuration from the provided path. // LoadConfig loads the configuration from the provided path.
func LoadConfig(path string) (*Config, error) { func LoadConfig(path string) (*Config, error) {
f, err := os.Open(path) f, err := os.Open(path)
@ -72,7 +57,7 @@ func LoadConfig(path string) (*Config, error) {
} }
defer f.Close() defer f.Close()
c := DefaultConfig() c := &Config{}
if _, err := toml.DecodeReader(f, c); err != nil { if _, err := toml.DecodeReader(f, c); err != nil {
return nil, err return nil, err
} }