diff options
Diffstat (limited to 'create')
-rw-r--r-- | create/content.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/create/content.go b/create/content.go index 524803d36..ce5934e4a 100644 --- a/create/content.go +++ b/create/content.go @@ -60,7 +60,11 @@ func NewContent(h *hugolib.HugoSites, kind, targetPath string) error { cf := hugolib.NewContentFactory(h) if kind == "" { - kind = cf.SectionFromFilename(targetPath) + var err error + kind, err = cf.SectionFromFilename(targetPath) + if err != nil { + return err + } } b := &contentBuilder{ |