Created
July 16, 2013 03:11
-
-
Save ptantiku/6005470 to your computer and use it in GitHub Desktop.
Configure Apache2 to support HAML and SASS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# enable mod_ext_filter | |
a2enmod ext_filter | |
# create temp config file | |
cat <<EOF > /tmp/haml_sass | |
# For HAML & SASS (http://d.hatena.ne.jp/ursm/20080923/1222195693) | |
LoadModule ext_filter_module libexec/apache2/mod_ext_filter.so | |
AddType text/haml .haml | |
ExtFilterDefine HAML mode=output intype=text/haml outtype=text/html cmd="/usr/local/bin/haml -E UTF-8" | |
AddOutputFilter HAML .haml | |
AddType text/sass .sass | |
ExtFilterDefine SASS mode=output intype=text/sass outtype=text/css cmd=/usr/local/bin/sass | |
AddOutputFilter SASS .sass | |
EOF | |
# move to apache2 config directory | |
sudo mv /tmp/haml_sass /etc/apache2/conf.d/haml_sass | |
# restart apache2 server | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment