Output a timestamp with hugo server --watch - hugo - [fork] hugo port for 9front
(HTM) git clone git@git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit c07b10bba9fd444427e6a70a1dc6ea41d4083d29
(DIR) parent 2060031c1fa55d01eb9ceda03a73c8b63cab6291
(HTM) Author: Austin Ziegler <austin@zieglers.ca>
Date: Mon, 27 Oct 2014 17:23:54 -0400
Output a timestamp with hugo server --watch
Per a [discussion][thread] on discuss, I have implemented one possible
way to do this.
[thread]: http://discuss.gohugo.io/t/output-a-timestamp-with-hugo-watch/213
Diffstat:
M commands/hugo.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/commands/hugo.go b/commands/hugo.go
@@ -371,7 +371,9 @@ func NewWatcher(port int) error {
}
if dynamic_changed {
- fmt.Print("Change detected, rebuilding site\n\n")
+ fmt.Print("\nChange detected, rebuilding site\n")
+ const layout = "2006-01-02 15:04 -0700"
+ fmt.Println(time.Now().Format(layout))
utils.StopOnErr(buildSite(true))
if !viper.GetBool("DisableLiveReload") {