package main import ( "flag" "fmt" "os" "atlas9.dev/c/core/site" ) func cmdGensite(args []string) { fs := flag.NewFlagSet("atlas9 gensite", flag.ExitOnError) src := fs.String("src", "", "source directory (base.html, pages/, partials/, static/)") out := fs.String("out", "", "output directory for the generated static site") fs.Parse(args) if *src == "" || *out == "" { fmt.Fprintln(os.Stderr, "atlas9 gensite: --src and --out are required") os.Exit(2) } if err := site.Build(*src, *out); err != nil { fmt.Fprintf(os.Stderr, "atlas9 gensite: %v\n", err) os.Exit(1) } }