|
|
|
@ -24,7 +24,7 @@ func HugoCmdProcessConfig(ch *CaddyHugo, es *editSession, touchFn func()) idlesh |
|
|
|
|
cmd.Dir = es.tmpdir |
|
|
|
|
|
|
|
|
|
return idleshut.Config{ |
|
|
|
|
Tick: WebsocketFileTicker, |
|
|
|
|
TickDuration: WebsocketFileTicker, |
|
|
|
|
MaxIdleTicks: uint(IdleWebsocketTimeout/WebsocketFileTicker) + 1, |
|
|
|
|
Start: func() error { |
|
|
|
|
|
|
|
|
@ -56,13 +56,10 @@ func HugoCmdProcessConfig(ch *CaddyHugo, es *editSession, touchFn func()) idlesh |
|
|
|
|
|
|
|
|
|
return nil |
|
|
|
|
}, |
|
|
|
|
IdleProcessError: func(err error) { |
|
|
|
|
TickError: func(err error) { |
|
|
|
|
fmt.Println("error processing draft:", err) |
|
|
|
|
}, |
|
|
|
|
IdleTick: func() error { |
|
|
|
|
return ioutil.WriteFile(es.filename, []byte(es.doc.Contents()), 0644) |
|
|
|
|
}, |
|
|
|
|
ActiveTick: func() error { |
|
|
|
|
Tick: func() error { |
|
|
|
|
return ioutil.WriteFile(es.filename, []byte(es.doc.Contents()), 0644) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|