From 7cfdc43226930b21bae2e02581672a338a9c0789 Mon Sep 17 00:00:00 2001 From: Himanshu Sardana Date: Wed, 25 Mar 2026 00:42:18 +0000 Subject: feat: better gruvbox theme --- main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index a9404f9..70962cc 100644 --- a/main.go +++ b/main.go @@ -44,19 +44,19 @@ type Frontmatter struct { Tags []string `yaml:"tags"` } +var themeName = "gruvbox" + func main() { contentDir := "./content" outputDir := "./output" posts := make([]Post, 0) - themeName := "modern-light" - args := os.Args if len(args) > 1 { switch args[1] { case "serve": - copyFile("./themes/"+themeName+".css", "./output/style.css") + copyFile("./themes/"+themeName+"/style.css", "./output/style.css") fs := http.FileServer(http.Dir("./output/")) http.Handle("/", fs) @@ -101,7 +101,7 @@ func main() { TOC: toc, } - tmpl, err := template.ParseFiles("./layout.html") + tmpl, err := template.ParseFiles("./themes/" + themeName + "/layout.html") if err != nil { log.Fatalf("Error parsing template: %s", err) } @@ -258,7 +258,7 @@ func renderHomePage(summaries []PostSummary, outputDir string) { panic(err) } - tmpl, err := template.ParseFiles("./home.html") + tmpl, err := template.ParseFiles("./themes/" + themeName + "/home.html") if err != nil { log.Fatalf("Error parsing home template: %s", err) } -- cgit v1.3.1