summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-25 09:31:54 +0000
committerHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-25 09:31:54 +0000
commit8056adbc8fd1ec8e4ac165c79f678de3f270e896 (patch)
tree7094019143aaed7b0eefa5ba37719b80636c103a /internal
parentaf0332e7d805f7a4cb1086b66f61ad706a082768 (diff)
refactor: move help message func to internal
Diffstat (limited to 'internal')
-rw-r--r--internal/build/build.go42
1 files changed, 42 insertions, 0 deletions
diff --git a/internal/build/build.go b/internal/build/build.go
index 1fe85b3..74dda4e 100644
--- a/internal/build/build.go
+++ b/internal/build/build.go
@@ -238,3 +238,45 @@ func renderHomePage(summaries []PostSummary, outputDir string) {
}
fmt.Println("Home page written to", outPath)
}
+
+func ListThemes() []string {
+ themeList := make([]string, 0)
+ themes, err := os.ReadDir("./themes")
+ if err != nil {
+ log.Fatal("Error:", err)
+ }
+ for _, theme := range themes {
+ if theme.IsDir() {
+ themeList = append(themeList, string(theme.Name()))
+ }
+ }
+
+ return themeList
+}
+
+func ShowHelpMessage() {
+ fmt.Println(`
+Kite — A lightweight static site generator
+
+USAGE:
+ kite <command> [options]
+
+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
+
+OPTIONS:
+ -h, --help Show this help message
+
+EXAMPLES:
+ kite build
+ kite serve
+ kite serve --port 8080
+ kite list-themes
+
+DESCRIPTION:
+ Kite converts your content into a static website using themes and templates.
+ Use 'build' for production output and 'serve' for local development.
+`)
+}