diff --git a/pad.go b/pad.go index 037a1f3..1545b4f 100644 --- a/pad.go +++ b/pad.go @@ -60,6 +60,10 @@ func handleViewPad(app *App, w http.ResponseWriter, r *http.Request) error { if action == "" && slug == "" { // Not editing any post; simply render the Pad + if templates[padTmpl] == nil { + log.Info("No template '%s' found. Falling back to default 'pad' template.", padTmpl) + padTmpl = "pad" + } if err = templates[padTmpl].ExecuteTemplate(w, "pad", appData); err != nil { log.Error("Unable to execute template: %v", err) }