From 5d2e8864e5319d96f29e5c7aac1ee513d3f80a9e 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 Former-commit-id: 73c31acfa1c812e896c57562338bd1fc27e3a3fb [formerly 15188c05c39a31691a875a57fadc2b397942146c] [formerly 6ad4d891a760572954b88383b41ced35bffc14c2 [formerly 97365f0e1618a7f0a3268fdd2e7f489662538975]] Former-commit-id: cb059d6f523e1f4a158bd504e04ce052ce32ae8b [formerly 945c4570eaa8478e7cea4dea8085a0ad69dfc063] Former-commit-id: 138a1faefacab94f8ba14e0b72c75dd41fa9b965 --- 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 {