From 9989337b3f760267f40bfe67a501eed3de012417 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sun, 18 Feb 2018 09:24:10 -0800 Subject: watch now also rebuilds on template file changes --- render/render.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'render') diff --git a/render/render.go b/render/render.go index ba8e52b..bf53208 100644 --- a/render/render.go +++ b/render/render.go @@ -77,7 +77,11 @@ func Init() { tx := template.New("t").Funcs(tmplFuncs) templates[tf], err = tx.ParseFiles(base, t) if err != nil { - panic(err) + // temporary files can confuse this, especially when + // running the file system watcher so we silently + // ignore any templates that disappeared since we started + // since this is usually not a real error condition + delete(templates, tf) } } rel_href = regexp.MustCompile(`href="/(.+)"`) -- cgit v1.2.3