mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
committed by
Bjørn Erik Pedersen
parent
84d7a108e8
commit
9d1d8c8899
@@ -76,10 +76,8 @@ Ensure you run this within the root directory of your site.`,
|
|||||||
&simpleCommand{
|
&simpleCommand{
|
||||||
name: "site",
|
name: "site",
|
||||||
use: "site [path]",
|
use: "site [path]",
|
||||||
short: "Create a new site (skeleton)",
|
short: "Create a new site",
|
||||||
long: `Create a new site in the provided directory.
|
long: `Create a new site at the specified path.`,
|
||||||
The new site will have the correct structure, but no content or theme yet.
|
|
||||||
Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
|
|
||||||
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
return newUserError("path needs to be provided")
|
return newUserError("path needs to be provided")
|
||||||
@@ -124,11 +122,9 @@ Use ` + "`hugo new [contentPath]`" + ` to create new content.`,
|
|||||||
&simpleCommand{
|
&simpleCommand{
|
||||||
name: "theme",
|
name: "theme",
|
||||||
use: "theme [name]",
|
use: "theme [name]",
|
||||||
short: "Create a new theme (skeleton)",
|
short: "Create a new theme",
|
||||||
long: `Create a new theme (skeleton) called [name] in ./themes.
|
long: `Create a new theme with the specified name in the ./themes directory.
|
||||||
New theme is a skeleton. Please add content to the touched files. Add your
|
This generates a functional theme including template examples and sample content.`,
|
||||||
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 {
|
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
|
||||||
if len(args) < 1 {
|
if len(args) < 1 {
|
||||||
return newUserError("theme name needs to be provided")
|
return newUserError("theme name needs to be provided")
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# Test the new command.
|
# Test the new command.
|
||||||
|
|
||||||
hugo new site -h
|
hugo new site -h
|
||||||
stdout 'Create a new site in the provided directory'
|
stdout 'Create a new site at the specified path.'
|
||||||
hugo new site my-yaml-site --format yml
|
hugo new site my-yaml-site --format yml
|
||||||
checkfile my-yaml-site/hugo.yml
|
checkfile my-yaml-site/hugo.yml
|
||||||
hugo new site mysite -f
|
hugo new site mysite -f
|
||||||
@@ -19,7 +19,7 @@ exists themes
|
|||||||
! exists resources
|
! exists resources
|
||||||
|
|
||||||
hugo new theme -h
|
hugo new theme -h
|
||||||
stdout 'Create a new theme \(skeleton\) called \[name\] in ./themes'
|
stdout 'Create a new theme with the specified name in the ./themes directory.'
|
||||||
hugo new theme mytheme --format yml
|
hugo new theme mytheme --format yml
|
||||||
stdout 'Creating new theme'
|
stdout 'Creating new theme'
|
||||||
! exists resources
|
! exists resources
|
||||||
|
Reference in New Issue
Block a user