This commit is contained in:
Henrique Dias
2015-09-20 22:00:25 +01:00
parent 96e4ec0baf
commit 6f972d1ae4
4 changed files with 29 additions and 6 deletions

View File

@@ -12,8 +12,16 @@ import (
"unicode"
"github.com/hacdias/caddy-hugo/assets"
"github.com/hacdias/caddy-hugo/config"
"github.com/spf13/hugo/commands"
)
// RunHugo is used to run hugo
func RunHugo(c *config.Config) {
commands.HugoCmd.ParseFlags(c.Flags)
commands.HugoCmd.Run(commands.HugoCmd, make([]string, 0))
}
// CopyFile is used to copy a file
func CopyFile(old, new string) error {
// Open the file and create a new one