From 6cdc1458091e8c6ea9ae8fee4b2137dec44374c1 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 12 Sep 2015 22:18:29 +0100 Subject: [PATCH] udpate --- edit/edit.go | 2 ++ hugo.go | 6 ++---- routing/routing.go | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/edit/edit.go b/edit/edit.go index c0a7ddc5..e2fa2497 100644 --- a/edit/edit.go +++ b/edit/edit.go @@ -20,6 +20,8 @@ func Execute(w http.ResponseWriter, r *http.Request, file string) (int, error) { } file, _ := ioutil.ReadFile(file) + + // render the template here w.Write([]byte(string(file))) } diff --git a/hugo.go b/hugo.go index c6f76b68..7b52ba34 100644 --- a/hugo.go +++ b/hugo.go @@ -3,12 +3,10 @@ package hugo import ( "net/http" - "github.com/spf13/hugo/commands" - + "github.com/hacdias/caddy-hugo/routing" "github.com/mholt/caddy/config/setup" "github.com/mholt/caddy/middleware" - - "github.com/hacdias/caddy-hugo/routing" + "github.com/spf13/hugo/commands" ) // Setup function diff --git a/routing/routing.go b/routing/routing.go index ad922fe4..8b655067 100644 --- a/routing/routing.go +++ b/routing/routing.go @@ -39,5 +39,4 @@ func Route(w http.ResponseWriter, r *http.Request) (int, error) { } return 200, nil - }