From 97365f0e1618a7f0a3268fdd2e7f489662538975 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 27 Jul 2017 18:05:57 +0100 Subject: [PATCH] A fix for #161 --- caddy/hugo/hugo.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/caddy/hugo/hugo.go b/caddy/hugo/hugo.go index a39077f1..f0fe4e2f 100644 --- a/caddy/hugo/hugo.go +++ b/caddy/hugo/hugo.go @@ -71,7 +71,6 @@ func (h hugo) BeforeAPI(c *filemanager.RequestContext, w http.ResponseWriter, r } filename := filepath.Join(string(c.User.FileSystem), r.URL.Path) - filename = strings.TrimPrefix(filename, "/") archetype := r.Header.Get("archetype") ext := filepath.Ext(filename) @@ -100,7 +99,6 @@ func (h hugo) BeforeAPI(c *filemanager.RequestContext, w http.ResponseWriter, r } filename := filepath.Join(string(c.User.FileSystem), r.URL.Path) - filename = strings.TrimPrefix(filename, "/") // Before save command handler. if err := c.FM.Runner("before_publish", filename); err != nil {