I wanted to do get some HTML pages up quickly to test out safariwatir
(automated web testing library) but these days I can't stand to write
HTML when HAML is around so I added a few lines to my httpd.conf:
# HAML support
LoadModule ext_filter_module modules/mod_ext_filter.so # may not be
necessary for you
AddType text/haml .haml
ExtFilterDefine HAML mode=output cmd=/opt/local/bin/haml
intype=text/haml outtype=text/html
DirectoryIndex index.php index.haml index.html index.htm # optional
Adjust cmd under ExtFilterDefine to point to the HAML command on your
system. I believe it has to be absolute. You can use the "which"
command to tell you where it is residing.
Now you can stick files ending in .haml under any DocumentRoot they
will be processed by HAML and text/html will be sent to the client!
It's not too fast though, a process has to be forked for each request
so this is best used for prototyping type situations.
Hope this helps someone.
Ollie