mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02:00
Revert "tpl: Rework to handle both text and HTML templates"
Will have to take another stab at this ...
This reverts commit 5c5efa03d2
.
Closes #3260
This commit is contained in:
@@ -127,11 +127,11 @@ func NewHugoSites(cfg deps.DepsCfg) (*HugoSites, error) {
|
||||
return newHugoSites(cfg, sites...)
|
||||
}
|
||||
|
||||
func (s *Site) withSiteTemplates(withTemplates ...func(templ tpl.TemplateHandler) error) func(templ tpl.TemplateHandler) error {
|
||||
return func(templ tpl.TemplateHandler) error {
|
||||
templ.LoadTemplates(s.PathSpec.GetLayoutDirPath(), "")
|
||||
func (s *Site) withSiteTemplates(withTemplates ...func(templ tpl.Template) error) func(templ tpl.Template) error {
|
||||
return func(templ tpl.Template) error {
|
||||
templ.LoadTemplates(s.PathSpec.GetLayoutDirPath())
|
||||
if s.PathSpec.ThemeSet() {
|
||||
templ.LoadTemplates(s.PathSpec.GetThemeDir()+"/layouts", "theme")
|
||||
templ.LoadTemplatesWithPrefix(s.PathSpec.GetThemeDir()+"/layouts", "theme")
|
||||
}
|
||||
|
||||
for _, wt := range withTemplates {
|
||||
|
Reference in New Issue
Block a user