diff options
Diffstat (limited to 'dynamic.go')
-rw-r--r-- | dynamic.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -21,7 +21,7 @@ package main | |||
21 | 21 | ||
22 | import ( | 22 | import ( |
23 | "fmt" | 23 | "fmt" |
24 | "github.com/hoisie/mustache" | 24 | "github.com/drbawb/mustache" |
25 | "net/http" | 25 | "net/http" |
26 | "path" | 26 | "path" |
27 | "strings" | 27 | "strings" |
@@ -49,7 +49,7 @@ func handle(w http.ResponseWriter, r *http.Request) { | |||
49 | 49 | ||
50 | // render the page | 50 | // render the page |
51 | template := merge(elements) | 51 | template := merge(elements) |
52 | page := mustache.Render(string(template), nil /* TODO: generate contextual variables */) | 52 | page := mustache.Render(string(template), makeContext(path.Join(*settings.sourceDir, request), *settings.sourceDir, *settings.outputDir, settings.exts)) |
53 | 53 | ||
54 | // serve the page | 54 | // serve the page |
55 | _, err := w.Write([]byte(page)) | 55 | _, err := w.Write([]byte(page)) |