# HG changeset patch # User yakumo.izuru # Date 1682743042 0 # Node ID 2d9f9b32ae1f8852e1a98863b5c5ed15dd84dbc2 # Parent e8f54da51137f61901dc8dc136b9da37b3c863c3 Add a clean subcommand Signed-off-by: Izuru Yakumo diff -r e8f54da51137 -r 2d9f9b32ae1f aya.1 --- a/aya.1 Wed Apr 26 12:40:20 2023 +0000 +++ b/aya.1 Sat Apr 29 04:37:22 2023 +0000 @@ -19,6 +19,8 @@ .Bl -tag .It build (Re-)build a site or a file in particular +.It clean +Removes the generated site directory .It serve Serve generated site over HTTP .It var diff -r e8f54da51137 -r 2d9f9b32ae1f cmd/aya/main.go --- a/cmd/aya/main.go Wed Apr 26 12:40:20 2023 +0000 +++ b/cmd/aya/main.go Sat Apr 29 04:37:22 2023 +0000 @@ -380,6 +380,7 @@ fmt.Printf("\n") fmt.Printf("Where is:\n") fmt.Printf("\tbuild\tGenerate site\n") + fmt.Printf("\tclean\tRemoves the generated site directory\n") fmt.Printf("\tserve\tServe %v over HTTP\n", PUBDIR) fmt.Printf("\tvar\tQuery variable(s) from a markdown file\n") fmt.Printf("\tversion\tPrint program version and exit\n") @@ -406,6 +407,9 @@ } else { fmt.Println("ERROR: too many arguments") } + case "clean": + fmt.Println("Removing generated site directory") + os.RemoveAll(PUBDIR) case "serve": servePubDir() case "var":