From 85e2ac1a4424fdde673b663c37043ece61212f0c Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 20 Nov 2022 08:10:39 -0800 Subject: [PATCH] commands: Create assets directory with new site Closes #10460 --- commands/commands_test.go | 8 +++++--- commands/new_site.go | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/commands/commands_test.go b/commands/commands_test.go index 5b5e9aa81..8f1ef825d 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -117,11 +117,13 @@ func TestExecute(t *testing.T) { func checkNewSiteInited(c *qt.C, basepath string) { paths := []string{ - filepath.Join(basepath, "layouts"), - filepath.Join(basepath, "content"), filepath.Join(basepath, "archetypes"), - filepath.Join(basepath, "static"), + filepath.Join(basepath, "assets"), + filepath.Join(basepath, "content"), filepath.Join(basepath, "data"), + filepath.Join(basepath, "layouts"), + filepath.Join(basepath, "static"), + filepath.Join(basepath, "themes"), filepath.Join(basepath, "config.toml"), } diff --git a/commands/new_site.go b/commands/new_site.go index 384c6365b..438553ae7 100644 --- a/commands/new_site.go +++ b/commands/new_site.go @@ -62,11 +62,12 @@ Use ` + "`hugo new [contentPath]`" + ` to create new content.`, func (n *newSiteCmd) doNewSite(fs *hugofs.Fs, basepath string, force bool) error { archeTypePath := filepath.Join(basepath, "archetypes") dirs := []string{ - filepath.Join(basepath, "layouts"), - filepath.Join(basepath, "content"), archeTypePath, - filepath.Join(basepath, "static"), + filepath.Join(basepath, "assets"), + filepath.Join(basepath, "content"), filepath.Join(basepath, "data"), + filepath.Join(basepath, "layouts"), + filepath.Join(basepath, "static"), filepath.Join(basepath, "themes"), }