-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Description
As shown in my reduced test case, there is a problem when rendering ACE base templates in themes. In that test case, I have a layouts/index.ace that provides content to be rendered by the theme's layouts/_defaults/baseof.ace (whose full path is themes/demotheme/layouts/_defaults/baseof.ace). At tpl/templates.go:307, however, only four paths are checked for baseof.ace:
pathsToCheck := []string{
filepath.Join(templateDir, currBaseAceFilename),
filepath.Join(templateDir, baseAceFilename),
filepath.Join(absPath, "_default", currBaseAceFilename),
filepath.Join(absPath, "_default", baseAceFilename)}which translates to:
checking: '/Volumes/Dev/hugo-bugs/baseoface/layouts/index-baseof.ace'
checking: '/Volumes/Dev/hugo-bugs/baseoface/layouts/baseof.ace'
checking: '/Volumes/Dev/hugo-bugs/baseoface/layouts/_default/index-baseof.ace'
checking: '/Volumes/Dev/hugo-bugs/baseoface/layouts/_default/baseof.ace'
Notably, the theme directory is not checked. The theme directory is consulted when we're looking for templates in it via a call to loadTemplates('/Volumes/Dev/hugo-bugs/baseoface/themes/demotheme/layouts', 'theme'), but at that point it's too late: we've already failed to find the base template for my index.ace.