mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Remove default 'gemini' task
This commit is contained in:
parent
133b371e4c
commit
95839fcf4c
17
config.go
17
config.go
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue