summaryrefslogtreecommitdiff
path: root/src/http/tpl.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/tpl.go')
-rw-r--r--src/http/tpl.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/http/tpl.go b/src/http/tpl.go
index c4afbdc..57d7cfd 100644
--- a/src/http/tpl.go
+++ b/src/http/tpl.go
@@ -90,25 +90,12 @@ func (a *api) draftsURL(abs bool) string {
return a.blogURL(a.params.PublicURL, "drafts", abs)
}
-func (a *api) tplFuncs() template.FuncMap {
- return template.FuncMap{
- "DraftURL": func(id string) string { return a.draftPostURL(id, false) },
- }
-}
-
-func (a *api) emptyTpl() *template.Template {
- tpl := template.New("")
- tpl = tpl.Funcs(a.tplFuncs())
- tpl = tpl.Funcs(a.postPreprocessFuncs().ToFuncMap())
- return tpl
-}
-
func mustParseTpl(tpl *template.Template, name string) *template.Template {
return template.Must(tpl.New(name).Parse(mustReadTplFile(name)))
}
func (a *api) mustParseBasedTpl(name string) *template.Template {
- tpl := a.emptyTpl()
+ tpl := template.New("")
tpl = mustParseTpl(tpl, "gemini-cta.html")
tpl = mustParseTpl(tpl, "base.html")
tpl = mustParseTpl(tpl, name)