mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-23 07:12:30 -04:00
Merge pull request #196 from evermax/master
markdown, browse: Integrated Context struct for templating
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user