func runServer(args []string) { config := builder.NewSiteConfig(args) site := builder.NewSite(config, nil) watcher := site.MakeWatcher(func() { site.InitGenerate() }) webserver := site.MakeWebserver() if err := watcher.Watch(); err != nil { log.Fatalln(err) } if err := webserver.Serve(); err != nil { log.Fatalln(err) } }
func runBuild(args []string) { config := builder.NewSiteConfig(args) site := builder.NewSite(config, nil) site.GenerateFiles() }