Permalink
Browse files

use 'views' as standard dir

  • Loading branch information...
1 parent 6ad66c9 commit 0bf35cfa1d8202742351861c5706c19ab692bfc8 @mmikulicic committed Mar 29, 2010
Showing with 4 additions and 2 deletions.
  1. +3 −1 README.md
  2. +1 −1 src/haml_macro/core.clj
  3. 0 {pages → views}/example.haml
View
@@ -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.
@@ -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))))
File renamed without changes.

0 comments on commit 0bf35cf

Please sign in to comment.