regenerate button working
This commit is contained in:
6
hugo.go
6
hugo.go
@@ -74,8 +74,12 @@ func (h Hugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||
if directory.CanBeEdited(r.URL.Path) && r.Method == http.MethodPut {
|
||||
code, err := h.FileManager.ServeHTTP(w, r)
|
||||
|
||||
if err != nil {
|
||||
return code, err
|
||||
}
|
||||
|
||||
if r.Header.Get("Regenerate") == "true" {
|
||||
go RunHugo(h.Config, false)
|
||||
RunHugo(h.Config, false)
|
||||
}
|
||||
|
||||
if r.Header.Get("Schedule") != "" {
|
||||
|
||||
Reference in New Issue
Block a user