summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruint <abhinav.prsai@gmail.com>2026-01-21 12:12:45 +0000
committeruint <abhinav.prsai@gmail.com>2026-01-21 12:12:45 +0000
commiteda664ed69f6d52fb4fb3f10b56c4a4548ebf1bc (patch)
tree956941da45b0ebb83d91ebcb2e7605efd6edb0ab
parentb2394723c50699218929165f8a568caf1ffc6192 (diff)
replace all occurences of replacement tags
-rw-r--r--kew.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/kew.go b/kew.go
index c6a5fd6..faf6fe5 100644
--- a/kew.go
+++ b/kew.go
@@ -210,10 +210,10 @@ func main() {
render_nav(rootnav, &navbuf, cur)
page := string(tmpl)
- page = strings.Replace(page, "{{TITLE}}", SiteTitle, 1)
- page = strings.Replace(page, "{{NAV}}", navbuf.String(), 1)
- page = strings.Replace(page, "{{CONTENT}}", html, 1)
- page = strings.Replace(page, "{{FOOTER}}", FooterText, 1)
+ page = strings.ReplaceAll(page, "{{TITLE}}", SiteTitle)
+ page = strings.ReplaceAll(page, "{{NAV}}", navbuf.String())
+ page = strings.ReplaceAll(page, "{{CONTENT}}", html)
+ page = strings.ReplaceAll(page, "{{FOOTER}}", FooterText)
outpath = strings.TrimSuffix(outpath, ".md") + ".html"
return os.WriteFile(outpath, []byte(page), 0644)