diff --git a/templates.go b/templates.go index ff00ee7..6070b78 100644 --- a/templates.go +++ b/templates.go @@ -148,11 +148,19 @@ func (t *Templates) Load(dir string, exts []string) error { if _, ok := extsMap[ext]; !ok { continue } + if strings.HasPrefix(path, "_partials/") { + continue + } basePath := pathpkg.Join(pathpkg.Dir(path), "base"+ext) if path == basePath { continue } - if base, ok := t.tmpls[basePath]; ok { + base, ok := t.tmpls[basePath] + if !ok { + basePath = pathpkg.Join("_default", "base"+ext) + base, ok = t.tmpls[basePath] + } + if ok { tmpl, err := base.Clone() if err != nil { return err