I am fairly new to NGINX and Python is not my field at all. I am interested in introducing SASS support in my server. I don't want to use Ruby, but I found Python version. https://github.com/Kronuz/pyScss I was wondering how do I configure NGINX to execute .scss files using the script in question?


SASS the style sheets; what you're asking for is to dynamically compile your .sass scripts into .css every time? I believe only Rails 3 does that, and even then it is surely cached after the first compilation run?

Compiling .sass into .css while your website visitor is waiting is bad style and the extra milliseconds will bore your visitor into loosing temper. Also, it is bottleneck and possible security risk.

So you should just pre-compile your .sass into regular .css and serve the .css as usual. You may even squeeze in some .css minification when you're at it, to get really great website performance.

Pre-compiling, see: http://ariejan.net/2010/09/28/precompile-sass-to-css-for-deployment-to-heroku/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.