mirror of
https://github.com/Kugelschieber/schnittfest.git
synced 2026-01-18 10:20:27 +00:00
Added option to hot reload templates for development.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/emvi/logbuch"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -18,7 +19,7 @@ var (
|
||||
)
|
||||
|
||||
func LoadTemplates() {
|
||||
tplCache = util.NewTemplateCache()
|
||||
tplCache = util.NewTemplateCache(strings.ToLower(os.Getenv("SCHNITTFEST_HOT_RELOAD")) == "true")
|
||||
templateBase := os.Getenv("SCHNITTFEST_TEMPLATE_BASE")
|
||||
|
||||
if templateBase == "" {
|
||||
|
||||
Reference in New Issue
Block a user