From e49d32933fc31cdf33fc2aa40688f4c8d874a66e Mon Sep 17 00:00:00 2001 From: Himanshu Sardana Date: Thu, 26 Mar 2026 22:31:01 +0000 Subject: feat: add init command --- cmd/root.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go index 79bb257..3ef07bc 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -26,11 +26,20 @@ func Execute() { runServe(args) case "list-themes": runListThemes(args) + case "init": + runInit(args) default: build.ShowHelpMessage() } } +func runInit(args []string) { + if err := RunInit(); err != nil { + fmt.Fprintf(os.Stderr, "Error: %v\n", err) + os.Exit(1) + } +} + func ShowHelp() { fmt.Println(` Kite — A lightweight static site generator @@ -42,6 +51,7 @@ COMMANDS: build Build the static site into the output directory serve Start a local development server with live reload list-themes List all available themes + init Initialize a new blog project OPTIONS: -h, --help Show this help message @@ -51,6 +61,7 @@ EXAMPLES: kite build gruvbox kite serve kite list-themes + kite init DESCRIPTION: Kite converts your content into a static website using themes and templates. -- cgit v1.3.1