diff options
| author | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-25 00:42:18 +0000 |
|---|---|---|
| committer | Himanshu Sardana <himanshusardana2005@gmail.com> | 2026-03-25 00:42:18 +0000 |
| commit | 7cfdc43226930b21bae2e02581672a338a9c0789 (patch) | |
| tree | fc6b91e8edda788636eabe1b3f91a6e8835d4f29 /main.go | |
| parent | a95bb6c3733da94bb85231af2b520026e87f571a (diff) | |
feat: better gruvbox theme
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) } |
