# HG changeset patch # User Ludovic Chabant # Date 1518587492 28800 # Node ID e00ff3dcb5ec549cdd7494489d6a15c9f3ae9d9b # Parent e1e459438f3fbc73fb9ee9da2fdb0df9f2a51308 sass: Make sure `load_paths` are relative to the website's root. diff -r e1e459438f3f -r e00ff3dcb5ec piecrust/processing/sass.py --- a/piecrust/processing/sass.py Tue Feb 13 21:29:32 2018 -0800 +++ b/piecrust/processing/sass.py Tue Feb 13 21:51:32 2018 -0800 @@ -126,6 +126,11 @@ raise Exception("The `sass/options` configuration setting " "must be an array of arguments.") + app_root_dir = self.app.root_dir + load_paths = list(self._conf['load_paths']) + for i, lp in enumerate(load_paths): + self._conf['load_paths'][i] = os.path.join(app_root_dir, lp) + cache_dir = None if self.app.cache.enabled: cache_dir = os.path.join(self.app.cache_dir, 'sass') @@ -133,8 +138,8 @@ def _getMapPath(self, path): map_name = "%s_%s.map" % ( - os.path.basename(path), - hashlib.md5(path.encode('utf8')).hexdigest()) + os.path.basename(path), + hashlib.md5(path.encode('utf8')).hexdigest()) map_path = os.path.join(self._map_dir, map_name) return map_path