diff options
Diffstat (limited to 'create')
-rw-r--r-- | create/content_template_handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/create/content_template_handler.go b/create/content_template_handler.go index 1576fabdb..b70cf02eb 100644 --- a/create/content_template_handler.go +++ b/create/content_template_handler.go @@ -129,7 +129,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, name, kind, targetPath, archety archetypeTemplate = []byte(archetypeShortcodeReplacementsPre.Replace(string(archetypeTemplate))) // Reuse the Hugo template setup to get the template funcs properly set up. - templateHandler := s.Deps.Tmpl.(tpl.TemplateHandler) + templateHandler := s.Deps.Tmpl.(tpl.TemplateManager) templateName := "_text/" + helpers.Filename(archetypeFilename) if err := templateHandler.AddTemplate(templateName, string(archetypeTemplate)); err != nil { return nil, errors.Wrapf(err, "Failed to parse archetype file %q:", archetypeFilename) @@ -138,7 +138,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, name, kind, targetPath, archety templ, _ := templateHandler.Lookup(templateName) var buff bytes.Buffer - if err := templ.Execute(&buff, data); err != nil { + if err := templateHandler.Execute(templ, &buff, data); err != nil { return nil, errors.Wrapf(err, "Failed to process archetype file %q:", archetypeFilename) } |