summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Deininger <adeininger@urbanonline.de>2023-06-28 09:30:27 +0200
committerGitHub <noreply@github.com>2023-06-28 09:30:27 +0200
commit793e38f5ce69c7eb3e70e377b21019f3eec912cb (patch)
tree468f0ec8ec01cae67ade244ba097ae39c061e8da
parent7f698c89346acb5e5116736d25325a046652ba81 (diff)
commands: Fix help message for hugo new theme
Closes #11161.
-rw-r--r--commands/new.go11
-rw-r--r--testscripts/commands/new.txt2
2 files changed, 7 insertions, 6 deletions
diff --git a/commands/new.go b/commands/new.go
index b5c4d2152..633f1becb 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -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 {
diff --git a/testscripts/commands/new.txt b/testscripts/commands/new.txt
index 92cc3b7da..4c77104b2 100644
--- a/testscripts/commands/new.txt
+++ b/testscripts/commands/new.txt
@@ -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