From 7b0b720efbf39ded2f72363d36424281df2b0491 Mon Sep 17 00:00:00 2001 From: Pacien Date: Sun, 30 Jun 2013 19:38:24 +0200 Subject: Add contextual methods --- dynamic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dynamic.go') diff --git a/dynamic.go b/dynamic.go index b6388bc..ff567c1 100644 --- a/dynamic.go +++ b/dynamic.go @@ -21,7 +21,7 @@ package main import ( "fmt" - "github.com/hoisie/mustache" + "github.com/drbawb/mustache" "net/http" "path" "strings" @@ -49,7 +49,7 @@ func handle(w http.ResponseWriter, r *http.Request) { // render the page template := merge(elements) - page := mustache.Render(string(template), nil /* TODO: generate contextual variables */) + page := mustache.Render(string(template), makeContext(path.Join(*settings.sourceDir, request), *settings.sourceDir, *settings.outputDir, settings.exts)) // serve the page _, err := w.Write([]byte(page)) -- cgit v1.2.3