In a simple website I'm working on, I have a directory haml
and a directory pages
. The haml folder contains the .haml files I work on, and the pages folder contains my converted .html files.
I know I can convert the files, from the website root directory, by doing:
haml haml/about.haml pages/about.html
for each file.
However, is there a way to convert all the .haml files in my haml folder to an equivalent .html file in the pages folder?
Something like: haml haml/*.haml html/*.html
Thanks!
There's a python script that sounds like it will do exactly what you want...
I haven't tested it, but per the README, it sounds like it's as simple as:
python haml2html.py [input_dir] [output_dir]
guard watches
haml
files, compiles them, you can set an output dir as well.https://github.com/guard/guard-haml sounds like an option.
There is a nice html2haml gem for this purpose
and you can run it on a directory using