diff options
| author | Julian Hurst <ark@mansus.space> | 2025-09-29 18:57:57 +0200 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2025-09-29 18:58:26 +0200 |
| commit | 1d439c8d17e881b18b8cff74864b7ae76638e9ed (patch) | |
| tree | c16d891f1e234ac06856b03ab21c99857a11f79f | |
| parent | e3552f592ba5bce3fa3243166679fed986b6b949 (diff) | |
| download | ssg-1d439c8d17e881b18b8cff74864b7ae76638e9ed.tar.gz | |
| -rw-r--r-- | body.html (renamed from index.html) | 0 | ||||
| -rw-r--r-- | ssg.go | 6 |
2 files changed, 3 insertions, 3 deletions
@@ -30,8 +30,8 @@ type PostMetadata struct { Description string } -func buildTemplate(f string, w io.Writer, data interface{}) error { - tmpl, err := template.ParseFiles("base.html", "head.html", f) +func buildTemplate(w io.Writer, data interface{}) error { + tmpl, err := template.ParseFiles("base.html", "head.html", "body.html") if err != nil { return err } @@ -120,7 +120,7 @@ func main() { for _, ppost := range pposts { fmt.Fprintf(os.Stderr, "name: %s, description: %s\n", ppost.Metadata.Name, ppost.Metadata.Description) } - err = buildTemplate("index.html", idx, pposts) + err = buildTemplate(idx, pposts) if err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) |
