]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
commands: Fix help message for hugo new theme
authorAndreas Deininger <adeininger@urbanonline.de>
Wed, 28 Jun 2023 07:30:27 +0000 (09:30 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Jun 2023 07:30:27 +0000 (09:30 +0200)
Closes #11161.

commands/new.go
testscripts/commands/new.txt

index b5c4d2152b7d1317043630ebd4d9511b80936dd7..633f1becb7818a369ff75a58584eb109c9788b1e 100644 (file)
@@ -155,11 +155,12 @@ Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
                        },
                        &simpleCommand{
                                name:  "theme",
-                               use:   "theme [path]",
-                               short: "Create a new site (skeleton)",
-                               long: `Create a new site in the provided directory.
-The new site will have the correct structure, but no content or theme yet.
-Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
+                               use:   "theme [name]",
+                               short: "Create a new theme (skeleton)",
+                               long: `Create a new theme (skeleton) called [name] in ./themes.
+New theme is a skeleton. Please add content to the touched files. Add your
+name to the copyright line in the license and adjust the theme.toml file
+according to your needs.`,
                                run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
                                        h, err := r.Hugo(flagsToCfg(cd, nil))
                                        if err != nil {
index 92cc3b7da86cfd516d06628f326bb0b4cd17af57..4c77104b2ce773315c25ba01b415d4091ecb77b5 100644 (file)
@@ -10,7 +10,7 @@ cd mysite
 checkfile hugo.toml
 
 hugo new theme -h
-stdout 'Create a new site in the provided directory'
+stdout 'Create a new theme \(skeleton\) called \[name\] in ./themes'
 hugo new theme mytheme
 stdout 'Creating theme'
 cd themes