diff --git a/utils/utils.go b/utils/utils.go index 01d3e6fd..5716dac9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -14,6 +14,7 @@ import ( "github.com/hacdias/caddy-hugo/assets" "github.com/hacdias/caddy-hugo/config" "github.com/spf13/hugo/commands" + "github.com/spf13/viper" ) // CanBeEdited checks if the extension of a file is supported by the editor @@ -168,6 +169,7 @@ func Run(c *config.Config) { os.RemoveAll(c.Path + "public") commands.MainSite = nil + viper.Reset() c.Args = append([]string{"--source", c.Path}, c.Args...) commands.HugoCmd.ParseFlags(c.Args) if err := commands.HugoCmd.RunE(nil, nil); err != nil {