summaryrefslogtreecommitdiff
path: root/cmd/root.go
diff options
context:
space:
mode:
authorHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-26 22:31:01 +0000
committerHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-26 22:31:01 +0000
commite49d32933fc31cdf33fc2aa40688f4c8d874a66e (patch)
tree0f4aa695a93d206a3bf59760ef105804e3cd966e /cmd/root.go
parent2c09f0ab4de62e6a7d1d5e8f74f01097f3a3588d (diff)
feat: add init command
Diffstat (limited to 'cmd/root.go')
-rw-r--r--cmd/root.go11
1 files changed, 11 insertions, 0 deletions
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.