aboutsummaryrefslogtreecommitdiffstats
path: root/render
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2025-01-04 20:57:35 -0800
committerAdam Mathes <adam@trenchant.org>2025-01-04 20:57:35 -0800
commit828d9e39ce436c8290efa0dd875cbb9b8cbbf504 (patch)
treeb27bb2f9bddc1a593e15c144a3fd69ade3e91630 /render
parent3ed7a4cf8e3d8b9b157d9ca071fbf3da10214503 (diff)
downloadsnkt-828d9e39ce436c8290efa0dd875cbb9b8cbbf504.tar.gz
snkt-828d9e39ce436c8290efa0dd875cbb9b8cbbf504.tar.bz2
snkt-828d9e39ce436c8290efa0dd875cbb9b8cbbf504.zip
enable referring to all the templates in the directory to make life easier
Diffstat (limited to 'render')
-rw-r--r--render/render.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/render/render.go b/render/render.go
index 9698ad8..9e829ab 100644
--- a/render/render.go
+++ b/render/render.go
@@ -66,7 +66,7 @@ func Init() {
"SiteURL": SiteURL,
}
- base := path.Join(config.Config.TmplDir, BASE_TEMPLATE)
+ // base := path.Join(config.Config.TmplDir, BASE_TEMPLATE)
for _, t := range ts {
tf := filepath.Base(t)
@@ -74,7 +74,8 @@ func Init() {
// templates[tf] = template.Must(template.ParseFiles(t, base))
tx := template.New("t").Funcs(tmplFuncs)
- templates[tf], err = tx.ParseFiles(base, t)
+ // templates[tf], err = tx.ParseFiles(base, t, (ts...))
+ templates[tf], err = tx.ParseGlob(config.Config.TmplDir + "/*")
if err != nil {
// temporary files can confuse this, especially when
// running the file system watcher so we silently