From 72b255dd4b0b182e3529a3cead0015e73be81680 Mon Sep 17 00:00:00 2001 From: Pacien Date: Sat, 29 Jun 2013 13:03:56 +0200 Subject: Add custom parameters: parsable extensions, save as --- dynamic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dynamic.go') diff --git a/dynamic.go b/dynamic.go index 0307003..b6388bc 100644 --- a/dynamic.go +++ b/dynamic.go @@ -29,7 +29,7 @@ import ( func handle(w http.ResponseWriter, r *http.Request) { // serve static files - if !(path.Ext(r.URL.Path) == "" || isParsable(path.Ext(r.URL.Path))) { + if !(path.Ext(r.URL.Path) == "" || isParsable(path.Ext(r.URL.Path), settings.exts)) { http.ServeFile(w, r, path.Join(*settings.sourceDir, r.URL.Path)) return } @@ -44,7 +44,7 @@ func handle(w http.ResponseWriter, r *http.Request) { // parse these dirs elements := make(map[string][]byte) for _, dir := range dirs { - parse(path.Join(*settings.sourceDir, dir), elements, false) + parse(path.Join(*settings.sourceDir, dir), elements, settings.exts, false) } // render the page -- cgit v1.2.3