On my website (source: GitHub - BBaoVanC/bbaovanc.com: The source code of my website, uses https://github.com/BBaoVanC/bobatheme), if I do hugo new --kind blog blog/drafts/test
, then I get a panic:
panic: [BUG] no Page found for "/home/bbaovanc/git-repos/bbaovanc.com/content/blog/drafts/test/index.md"
goroutine 1 [running]:
github.com/gohugoio/hugo/create.(*contentBuilder).applyArcheType(0xc00025c9c0, {0xc000799e00, 0x47}, {0xc000043340, 0xd})
/home/bbaovanc/git-repos/hugo/create/content.go:276 +0x354
github.com/gohugoio/hugo/create.(*contentBuilder).buildDir(0xc00025c9c0)
/home/bbaovanc/git-repos/hugo/create/content.go:179 +0x7c5
github.com/gohugoio/hugo/create.NewContent.func1()
/home/bbaovanc/git-repos/hugo/create/content.go:93 +0x154
github.com/gohugoio/hugo/create.NewContent(0xc00047b760, {0x7fffdbf2a7bf, 0x4}, {0x7fffdbf2a7c4, 0x5a8f65})
/home/bbaovanc/git-repos/hugo/create/content.go:108 +0x5fe
github.com/gohugoio/hugo/commands.(*newCmd).newContent(0xc000529230, 0xc0003a0000, {0xc0004b6ff0, 0x1, 0x0})
/home/bbaovanc/git-repos/hugo/commands/new.go:83 +0x150
github.com/spf13/cobra.(*Command).execute(0xc0003a0000, {0xc0004b6fc0, 0x3, 0x3})
/home/bbaovanc/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc000724780)
/home/bbaovanc/.local/share/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/gohugoio/hugo/commands.Execute({0xc00003c0b0, 0x4, 0x4})
/home/bbaovanc/git-repos/hugo/commands/hugo.go:92 +0xb4
main.main()
/home/bbaovanc/git-repos/hugo/main.go:23 +0x58
It’s something in my site specifically though, because if I try this on an empty Hugo site, the same config.yaml
, and my theme cloned, then there’s no panic and the archetype is processed properly. The site also generates correctly too.