Merge pull request #196 from evermax/master

markdown, browse: Integrated Context struct for templating
This commit is contained in:
Matt Holt
2015-07-25 15:15:51 -06:00
23 changed files with 457 additions and 49 deletions
+1 -1
View File
@@ -2,8 +2,8 @@ package setup
import (
"fmt"
"html/template"
"io/ioutil"
"text/template"
"github.com/mholt/caddy/middleware"
"github.com/mholt/caddy/middleware/browse"
+2 -1
View File
@@ -62,7 +62,8 @@ func Markdown(c *Controller) (middleware.Middleware, error) {
reqPath = "/" + reqPath
// Generate the static file
_, err = md.Process(cfg, reqPath, body)
ctx := middleware.Context{Root: md.FileSys}
_, err = md.Process(cfg, reqPath, body, ctx)
if err != nil {
return err
}