mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
Remove default 'gemini' task
This commit is contained in:
parent
7c809876ff
commit
df30a5e482
17
config.go
17
config.go
|
@ -49,21 +49,6 @@ func (t Task) Format(p *Page) (string, []byte) {
|
|||
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.
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
f, err := os.Open(path)
|
||||
|
@ -72,7 +57,7 @@ func LoadConfig(path string) (*Config, error) {
|
|||
}
|
||||
defer f.Close()
|
||||
|
||||
c := DefaultConfig()
|
||||
c := &Config{}
|
||||
if _, err := toml.DecodeReader(f, c); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue