diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-11 08:39:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-11 09:50:19 +0200 |
commit | b110d0ae04e13fb45c739bcebb580709745082e6 (patch) | |
tree | 7db6bfde65008ec29bdc87746f3201c1615c8a13 /commands/new.go | |
parent | 73825cfc1c0b007830b24bb1947a565175b52d36 (diff) |
commands: Remove the Hugo global
There are still some cleaning to do, but that felt good.
See #4598
Diffstat (limited to 'commands/new.go')
-rw-r--r-- | commands/new.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/new.go b/commands/new.go index 851951ce9..c78c00bde 100644 --- a/commands/new.go +++ b/commands/new.go @@ -109,15 +109,15 @@ func (n *newCmd) newContent(cmd *cobra.Command, args []string) error { return nil, err } - if err := Hugo.Build(hugolib.BuildCfg{SkipRender: true}); err != nil { + if err := c.hugo.Build(hugolib.BuildCfg{SkipRender: true}); err != nil { return nil, err } - s = Hugo.Sites[0] + s = c.hugo.Sites[0] - if len(Hugo.Sites) > 1 { + if len(c.hugo.Sites) > 1 { // Find the best match. - for _, ss := range Hugo.Sites { + for _, ss := range c.hugo.Sites { if strings.Contains(createPath, "."+ss.Language.Lang) { s = ss break |