aboutsummaryrefslogtreecommitdiff
path: root/dynamic.go
diff options
context:
space:
mode:
authorPacien2013-06-30 19:38:24 +0200
committerPacien2013-06-30 19:38:24 +0200
commit7b0b720efbf39ded2f72363d36424281df2b0491 (patch)
treeffa76bfb44820c7bf6e2b75cf667b355b08c8f8f /dynamic.go
parent72b255dd4b0b182e3529a3cead0015e73be81680 (diff)
downloadfoldaweb-7b0b720efbf39ded2f72363d36424281df2b0491.tar.gz
Add contextual methods
Diffstat (limited to 'dynamic.go')
-rw-r--r--dynamic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/dynamic.go b/dynamic.go
index b6388bc..ff567c1 100644
--- a/dynamic.go
+++ b/dynamic.go
@@ -21,7 +21,7 @@ package main
21 21
22import ( 22import (
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))