diff options
| author | uint <abhinav.prsai@gmail.com> | 2026-01-21 12:12:45 +0000 |
|---|---|---|
| committer | uint <abhinav.prsai@gmail.com> | 2026-01-21 12:12:45 +0000 |
| commit | eda664ed69f6d52fb4fb3f10b56c4a4548ebf1bc (patch) | |
| tree | 956941da45b0ebb83d91ebcb2e7605efd6edb0ab | |
| parent | b2394723c50699218929165f8a568caf1ffc6192 (diff) | |
replace all occurences of replacement tags
| -rw-r--r-- | kew.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |
