diff options
Diffstat (limited to 'common.go')
-rw-r--r-- | common.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ package main | |||
22 | import ( | 22 | import ( |
23 | "bytes" | 23 | "bytes" |
24 | "fmt" | 24 | "fmt" |
25 | "github.com/hoisie/mustache" | 25 | "github.com/drbawb/mustache" |
26 | "github.com/russross/blackfriday" | 26 | "github.com/russross/blackfriday" |
27 | "io/ioutil" | 27 | "io/ioutil" |
28 | "path" | 28 | "path" |
@@ -100,7 +100,7 @@ func compile(dirPath string, elements map[string][]byte, sourceDir, outputDir, s | |||
100 | } | 100 | } |
101 | 101 | ||
102 | template := merge(elements) | 102 | template := merge(elements) |
103 | page := mustache.Render(string(template), nil /* TODO: generate contextual variables */) | 103 | page := mustache.Render(string(template), makeContext(dirPath, sourceDir, outputDir, exts)) |
104 | 104 | ||
105 | err := writeFile(path.Join(outputDir, strings.TrimPrefix(dirPath, sourceDir), saveAs), []byte(page)) | 105 | err := writeFile(path.Join(outputDir, strings.TrimPrefix(dirPath, sourceDir), saveAs), []byte(page)) |
106 | if err != nil { | 106 | if err != nil { |