]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
commands: Create assets directory with new site
authorJoe Mooring <joe.mooring@veriphor.com>
Sun, 20 Nov 2022 16:10:39 +0000 (08:10 -0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 21 Nov 2022 08:42:40 +0000 (09:42 +0100)
Closes #10460

commands/commands_test.go
commands/new_site.go

index 5b5e9aa81ed8efb61db67d6a3537aa38b052c5bc..8f1ef825d94aca829f54678439e1348241b09170 100644 (file)
@@ -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"),
        }
 
index 384c6365bee827b1fbde932beebf4695632b1c3e..438553ae7c05f2ab9814adabcfc932695efb8050 100644 (file)
@@ -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"),
        }