summaryrefslogtreecommitdiffstats
path: root/create/content_template_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'create/content_template_handler.go')
-rw-r--r--create/content_template_handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/create/content_template_handler.go b/create/content_template_handler.go
index b70cf02eb..e4cddedf5 100644
--- a/create/content_template_handler.go
+++ b/create/content_template_handler.go
@@ -129,9 +129,9 @@ 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.TemplateManager)
- templateName := "_text/" + helpers.Filename(archetypeFilename)
- if err := templateHandler.AddTemplate(templateName, string(archetypeTemplate)); err != nil {
+ templateHandler := s.Deps.Tmpl().(tpl.TemplateManager)
+ templateName := helpers.Filename(archetypeFilename)
+ if err := templateHandler.AddTemplate("_text/"+templateName, string(archetypeTemplate)); err != nil {
return nil, errors.Wrapf(err, "Failed to parse archetype file %q:", archetypeFilename)
}