Skip to main content

Lektor plugin to compile css out of sass - based on libsass

Project description

SCSS compiler for lektor

PyPI version Downloads

SCSS compiler for Lektor that compiles css from sass.

How does it acutually work?

  • It uses libsass
  • It looks for .scss and .sass files (ignores part files that begin with a underscore e.g. '_testfile.scss'), compiling them as part of the build process.
  • It only rebuilds the css when it's needed (file changed, a file it imports changed or the config changed).
  • When starting the the development server it watchs the files for changes in the background and rebuilds them when needed.


You can install the plugin with Lektor's installer::

lektor plugins add lektor-scss

Or by hand, adding the plugin to the packages section in your lektorproject file::

lektor-scss = 1.3.3


To enable scsscompile, pass the scss flag when starting the development server or when running a build:

# build and compile css from scss
lektor build -f scss

# edit site with new generated css
lektor server -f scss


The Plugin has the following settings you can adjust to your needs:

parameter default value description
source_dir assets/scss/ the directory in which the plugin searchs for sass files (subdirectories are included)
output_dir assets/css/ the directory the compiled css files get place at
output_style compressed coding style of the compiled result. choose one of: 'nested', 'expanded', 'compact', 'compressed'
source_comments False whether to add comments about source lines
precision 5 precision for numbers

An example file with the default config can be found at configs/scsscompile.ini


To test and/or develope this plugin in your running lektor installation, simply put it in the packages/ Folder and have a look at the Lektor Doku

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lektor-scss, version 1.3.3
Filename, size File type Python version Upload date Hashes
Filename, size lektor_scss-1.3.3-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size lektor-scss-1.3.3.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page