summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-28 00:29:05 +0000
committerHimanshu Sardana <himanshusardana2005@gmail.com>2026-03-28 00:29:05 +0000
commit98877caafbce3788df722292b39a6d98754b1c7e (patch)
treed455373d2ed65a168cbef135040ca1cc513677d5
parent29f1dffc7c2cab345d39920ca84d248d8c2c4f99 (diff)
fix: read default theme from config file
-rw-r--r--cmd/build.go5
-rw-r--r--cmd/serve.go6
2 files changed, 11 insertions, 0 deletions
diff --git a/cmd/build.go b/cmd/build.go
index 3877721..298a17b 100644
--- a/cmd/build.go
+++ b/cmd/build.go
@@ -6,11 +6,16 @@ import (
"os"
"github.com/HimanshuSardana/kite/internal/build"
+ "github.com/HimanshuSardana/kite/pkg/config"
)
func runBuild(args []string) {
themeName := DefaultTheme
+ if cfg, err := config.Load("config.yaml"); err == nil && cfg.DefaultTheme != "" {
+ themeName = cfg.DefaultTheme
+ }
+
if len(args) > 2 {
themeName = args[2]
}
diff --git a/cmd/serve.go b/cmd/serve.go
index 9387d29..d53e632 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -7,12 +7,18 @@ import (
"net/http"
"os"
"path/filepath"
+
+ "github.com/HimanshuSardana/kite/pkg/config"
)
func runServe(args []string) {
themeName := DefaultTheme
port := DefaultPort
+ if cfg, err := config.Load("config.yaml"); err == nil && cfg.DefaultTheme != "" {
+ themeName = cfg.DefaultTheme
+ }
+
for i := 2; i < len(args); i++ {
if args[i] == "--port" && i+1 < len(args) {
port = args[i+1]