diff options
Diffstat (limited to 'create/content.go')
-rw-r--r-- | create/content.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/create/content.go b/create/content.go index 914c16bec..eb0658604 100644 --- a/create/content.go +++ b/create/content.go @@ -91,6 +91,10 @@ func NewContent(h *hugolib.HugoSites, kind, targetPath string) error { return errors.Errorf("failed to resolve %q to a archetype template", targetPath) } + if !files.IsContentFile(b.targetPath) { + return errors.Errorf("target path %q is not a kown content format", b.targetPath) + } + return b.buildFile() } |