Use varutils instead

Former-commit-id: 454971910d12915f6668454ab00c0f92f9f80f40 [formerly 5fd29b6b99f57f9cd6be8a5c09151ef3feabbcc9] [formerly ac7480dcb9b5d3c240163f5f406f0ecebc842cee [formerly 2d83da4d7eb6e96fad54290909d6f8acd5d4785c]]
Former-commit-id: 77ec28f8a63a9b994059d28f467697cc6f03288b [formerly d031877a753306d0dd42c58686538a9eaf3211fc]
Former-commit-id: 818e4d03e50e4a04f1f38001c48dd45e71ed91ef
This commit is contained in:
Henrique Dias
2017-07-28 09:59:31 +01:00
parent f40731d3b4
commit 75ed779b17
6 changed files with 3 additions and 153 deletions

View File

@@ -10,7 +10,7 @@ import (
rice "github.com/GeertJohan/go.rice"
"github.com/hacdias/filemanager"
"github.com/hacdias/filemanager/variables"
"github.com/hacdias/varutils"
"github.com/robfig/cron"
)
@@ -140,7 +140,7 @@ func (h hugo) AfterAPI(c *filemanager.RequestContext, w http.ResponseWriter, r *
}
func (h hugo) JavaScript() string {
return rice.MustFindBox("./").MustString("hugo.js")
return rice.MustFindBox("./assets/").MustString("hugo.js")
}
// run runs Hugo with the define arguments.
@@ -151,7 +151,7 @@ func (h hugo) run(force bool) {
}
// Prevent running if watching is enabled
if b, pos := variables.StringInSlice("--watch", h.Args); b && !force {
if b, pos := varutils.StringInSlice("--watch", h.Args); b && !force {
if len(h.Args) > pos && h.Args[pos+1] != "false" {
return
}