|
|
@ -2,7 +2,6 @@ package caddyhugo |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"fmt" |
|
|
|
"os/exec" |
|
|
|
|
|
|
|
"path" |
|
|
|
"path" |
|
|
|
"time" |
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
@ -24,9 +23,8 @@ func (ch *CaddyHugo) Publish() error { |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
cmd := exec.Command("hugo") |
|
|
|
|
|
|
|
cmd.Dir = ch.Dir |
|
|
|
err = buildSite(ch.HugoSites) |
|
|
|
_, err = cmd.CombinedOutput() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|