Commit 4d867e84 authored by Abiola Ibrahim's avatar Abiola Ibrahim

Markdown: Fix panic on sitegen for request dependent template values.

parent c748ef94
...@@ -5,6 +5,8 @@ import ( ...@@ -5,6 +5,8 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"net/http"
"net/url"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
...@@ -104,7 +106,7 @@ func generateStaticHTML(md Markdown, cfg *Config) error { ...@@ -104,7 +106,7 @@ func generateStaticHTML(md Markdown, cfg *Config) error {
reqPath = "/" + reqPath reqPath = "/" + reqPath
// Generate the static file // Generate the static file
ctx := middleware.Context{Root: md.FileSys} ctx := middleware.Context{Root: md.FileSys, Req: new(http.Request), URL: new(url.URL)}
_, err = md.Process(cfg, reqPath, body, ctx) _, err = md.Process(cfg, reqPath, body, ctx)
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment