aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/templates.go
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2025-07-29 21:04:09 +0200
committerThomas Voss <mail@thomasvoss.com> 2025-07-29 21:04:09 +0200
commit68ff9fb91f49631f9fb9e35119fccb66f78d346f (patch)
treeaca0324385231cb39e7a4b5fa9201f90d92c918b /src/templates.go
parentb9d9cd2efb6096d63dc00f3aad05fcf04d25ea7f (diff)
Don’t require a rebuild when changing CSS
Diffstat (limited to 'src/templates.go')
-rw-r--r--src/templates.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/templates.go b/src/templates.go
index 353c755..dca1144 100644
--- a/src/templates.go
+++ b/src/templates.go
@@ -15,6 +15,7 @@ import (
)
type templateData struct {
+ Debugp bool
Printer i18n.Printer
Code, Type string
Mintages dbx.MintageData
@@ -35,7 +36,7 @@ var (
}
)
-func BuildTemplates(dir fs.FS, debugp bool) {
+func BuildTemplates(dir fs.FS) {
ents := Try2(fs.ReadDir(dir, "."))
notFoundTmpl = buildTemplate(dir, "-404")
errorTmpl = buildTemplate(dir, "-error")
@@ -44,7 +45,7 @@ func BuildTemplates(dir fs.FS, debugp bool) {
for _, e := range ents {
name := e.Name()
buildAndSetTemplate(dir, name)
- if debugp {
+ if Debugp {
go watch.FileFS(dir, name, func() {
defer func() {
if p := recover(); p != nil {