Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 11:09:11 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 18:36:36 +0300
commit2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 (patch)
treecda2d88ec0079293780028d3f0fe699f839777e7 /commands/new_site.go
parent0792cfa9fae94a06a31e393a46fed3b1dd73b66a (diff)
commands: Fix config environment handling
Fixes #6503 Fixes #6824
Diffstat (limited to 'commands/new_site.go')
-rw-r--r--commands/new_site.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/commands/new_site.go b/commands/new_site.go
index f884a6433..9fb47096a 100644
--- a/commands/new_site.go
+++ b/commands/new_site.go
@@ -37,11 +37,11 @@ var _ cmder = (*newSiteCmd)(nil)
type newSiteCmd struct {
configFormat string
- *baseCmd
+ *baseBuilderCmd
}
-func newNewSiteCmd() *newSiteCmd {
- ccmd := &newSiteCmd{}
+func (b *commandsBuilder) newNewSiteCmd() *newSiteCmd {
+ cc := &newSiteCmd{}
cmd := &cobra.Command{
Use: "site [path]",
@@ -49,15 +49,15 @@ func newNewSiteCmd() *newSiteCmd {
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.`,
- RunE: ccmd.newSite,
+ RunE: cc.newSite,
}
- cmd.Flags().StringVarP(&ccmd.configFormat, "format", "f", "toml", "config & frontmatter format")
+ cmd.Flags().StringVarP(&cc.configFormat, "format", "f", "toml", "config & frontmatter format")
cmd.Flags().Bool("force", false, "init inside non-empty directory")
- ccmd.baseCmd = newBaseCmd(cmd)
+ cc.baseBuilderCmd = b.newBuilderBasicCmd(cmd)
- return ccmd
+ return cc
}