Repository: gohugoio/hugo (language: go)

Issue:
Create assets directory when creating a new site
We currently create everything except the `assets` and `i18n` directories. Using global resources for images, CSS, and JavaScript is now quite common, and we've had several cases of new users trying to place their resources in `static/assets`.

The `i18n` directory is less common, so I don't think we need to create that. 


Discussion / hints:

Fix patch:
diff --git a/commands/new_site.go b/commands/new_site.go
index 384c6365bee..438553ae7c0 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"),
 	}
 


Test patch:
diff --git a/commands/commands_test.go b/commands/commands_test.go
index 5b5e9aa81ed..8f1ef825d94 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"),
 	}