From 93aad3c543828efca2adeb7f96cf50ae29878593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 18 Jun 2021 10:27:27 +0200 Subject: Split out the puthe path/filepath functions into common/paths So they can be used from the config package without cyclic troubles. Updates #8654 --- create/content_template_handler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'create/content_template_handler.go') diff --git a/create/content_template_handler.go b/create/content_template_handler.go index 3e9701e4b..09cf4c0a5 100644 --- a/create/content_template_handler.go +++ b/create/content_template_handler.go @@ -20,6 +20,8 @@ import ( "strings" "time" + "github.com/gohugoio/hugo/common/paths" + "github.com/pkg/errors" "github.com/gohugoio/hugo/helpers" @@ -129,7 +131,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, name, kind, targetPath, archety // Reuse the Hugo template setup to get the template funcs properly set up. templateHandler := s.Deps.Tmpl().(tpl.TemplateManager) - templateName := helpers.Filename(archetypeFilename) + templateName := paths.Filename(archetypeFilename) if err := templateHandler.AddTemplate("_text/"+templateName, string(archetypeTemplate)); err != nil { return nil, errors.Wrapf(err, "Failed to parse archetype file %q:", archetypeFilename) } -- cgit v1.2.3