From 7b0b720efbf39ded2f72363d36424281df2b0491 Mon Sep 17 00:00:00 2001 From: Pacien Date: Sun, 30 Jun 2013 19:38:24 +0200 Subject: Add contextual methods --- common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common.go') diff --git a/common.go b/common.go index 460f74d..3547af1 100644 --- a/common.go +++ b/common.go @@ -22,7 +22,7 @@ package main import ( "bytes" "fmt" - "github.com/hoisie/mustache" + "github.com/drbawb/mustache" "github.com/russross/blackfriday" "io/ioutil" "path" @@ -100,7 +100,7 @@ func compile(dirPath string, elements map[string][]byte, sourceDir, outputDir, s } template := merge(elements) - page := mustache.Render(string(template), nil /* TODO: generate contextual variables */) + page := mustache.Render(string(template), makeContext(dirPath, sourceDir, outputDir, exts)) err := writeFile(path.Join(outputDir, strings.TrimPrefix(dirPath, sourceDir), saveAs), []byte(page)) if err != nil { -- cgit v1.2.3