diff options
author | Pacien | 2013-06-29 13:03:56 +0200 |
---|---|---|
committer | Pacien | 2013-06-29 13:03:56 +0200 |
commit | 72b255dd4b0b182e3529a3cead0015e73be81680 (patch) | |
tree | 846652743fa17c428792202fb865d0ccd6c671b4 /dynamic.go | |
parent | 6f2476510a5b31ada07a42c19065b47bbe784b7a (diff) | |
download | foldaweb-72b255dd4b0b182e3529a3cead0015e73be81680.tar.gz |
Add custom parameters: parsable extensions, save as
Diffstat (limited to 'dynamic.go')
-rw-r--r-- | dynamic.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ import ( | |||
29 | 29 | ||
30 | func handle(w http.ResponseWriter, r *http.Request) { | 30 | func handle(w http.ResponseWriter, r *http.Request) { |
31 | // serve static files | 31 | // serve static files |
32 | if !(path.Ext(r.URL.Path) == "" || isParsable(path.Ext(r.URL.Path))) { | 32 | if !(path.Ext(r.URL.Path) == "" || isParsable(path.Ext(r.URL.Path), settings.exts)) { |
33 | http.ServeFile(w, r, path.Join(*settings.sourceDir, r.URL.Path)) | 33 | http.ServeFile(w, r, path.Join(*settings.sourceDir, r.URL.Path)) |
34 | return | 34 | return |
35 | } | 35 | } |
@@ -44,7 +44,7 @@ func handle(w http.ResponseWriter, r *http.Request) { | |||
44 | // parse these dirs | 44 | // parse these dirs |
45 | elements := make(map[string][]byte) | 45 | elements := make(map[string][]byte) |
46 | for _, dir := range dirs { | 46 | for _, dir := range dirs { |
47 | parse(path.Join(*settings.sourceDir, dir), elements, false) | 47 | parse(path.Join(*settings.sourceDir, dir), elements, settings.exts, false) |
48 | } | 48 | } |
49 | 49 | ||
50 | // render the page | 50 | // render the page |