From bcf6d391f17a193c81ad6643f8d006de6c6abad8 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sun, 18 Jul 2021 16:27:24 -0400 Subject: Adjust the program a bit, remove clunky "head" templates. Add an example site among other improvements --- cmd/server/main.go | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'cmd/server/main.go') diff --git a/cmd/server/main.go b/cmd/server/main.go index 4b2c1ad..00aecbf 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -19,18 +19,6 @@ func VersionPrint() { os.Exit(0) } -func loadConf(fn string) (*App, error) { - fh, err := os.Open(fn) - if err != nil { - return nil, err - } - dec := yaml.NewDecoder(fh) - - app := &App{} - err = dec.Decode(app) - return app, err -} - func main() { fl := flag.NewFlagSet("Website", flag.ExitOnError) listen := fl.String("l", "0.0.0.0:8001", "Listening address") @@ -61,12 +49,6 @@ func main() { if app.ReIndexPath == "" || *indexPath != defaultIndexPath { app.ReIndexPath = *indexPath } - if app.StaticDirectory == "" { - app.StaticDirectory = "static" - } - if app.FeedPrefix == "" { - app.FeedPrefix = FeedPrefixDefault - } if *verbose { b, _ := yaml.Marshal(app) -- cgit v1.2.3