Skip to content

Commit

Permalink
use 'views' as standard dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Mikulicic committed Mar 29, 2010
1 parent 6ad66c9 commit 0bf35cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -7,9 +7,11 @@ USAGE:
(defroutes greeter
(GET "/hello/:first/:last" (haml "example.haml")))

see example.haml
see views/example.haml

you can change the directory where the templates are searched with:

(set-template-dir "somepath")

haml is compiled to clojure code, you need to reload your module from REPL to see your changes in HAML.

2 changes: 1 addition & 1 deletion src/haml_macro/core.clj
Expand Up @@ -82,7 +82,7 @@
(defn haml-str [strn]
(:value (parse source strn)))

(def *templates-dir* (atom "."))
(def *templates-dir* (atom "views"))

(defn haml-file [file]
(haml-str (slurp (str @*templates-dir* "/" file))))
Expand Down
File renamed without changes.

0 comments on commit 0bf35cf

Please sign in to comment.