Skip to content

Commit

Permalink
commands: Fix help message for hugo new theme
Browse files Browse the repository at this point in the history
Closes #11161.
  • Loading branch information
deining committed Jun 28, 2023
1 parent 7f698c8 commit 793e38f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion testscripts/commands/new.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 793e38f

Please sign in to comment.