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.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/create/content_template_handler.go b/create/content_template_handler.go
index 705efbd20..e9e7cb62b 100644
--- a/create/content_template_handler.go
+++ b/create/content_template_handler.go
@@ -88,10 +88,15 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, kind, targetPath, archetypeFile
err error
)
- sp := source.NewSourceSpec(s.Deps.Cfg, s.Deps.Fs)
+ ps, err := helpers.NewPathSpec(s.Deps.Fs, s.Deps.Cfg)
+ sp := source.NewSourceSpec(ps, ps.Fs.Source)
+ if err != nil {
+ return nil, err
+ }
f := sp.NewFileInfo("", targetPath, false, nil)
name := f.TranslationBaseName()
+
if name == "index" || name == "_index" {
// Page bundles; the directory name will hopefully have a better name.
dir := strings.TrimSuffix(f.Dir(), helpers.FilePathSeparator)