shithub: hugo

Download patch

ref: 646a52a5c5f52890f2d0270b68ba0f863047484a
parent: e421696d02bfb8764ae57238e211ce0e85e9782e
author: Bjørn Erik Pedersen <[email protected]>
date: Sat Oct 6 08:04:29 EDT 2018

tpl: Fix baseof.html in error message

This fix should also make the template loadin slightly faster, as we avoid to reparse the baseof.html files more than one time.

Fixes #5288

--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -568,7 +568,7 @@
 			return err
 		}
 
-		masterTpl, err = t.t.New(overlayFilename).Parse(templ)
+		masterTpl, err = t.t.New(masterFilename).Parse(templ)
 		if err != nil {
 			return err
 		}
@@ -609,7 +609,7 @@
 			return err
 		}
 
-		masterTpl, err = t.t.New(overlayFilename).Parse(templ)
+		masterTpl, err = t.t.New(masterFilename).Parse(templ)
 		if err != nil {
 			return err
 		}