Ready to go Jekyll framework that automatically compiles your sass to css, deletes unused selectors and minfies the css code.
Slim requires that you have node.js installed on your computer. Now you can setup a new site with slim by cloning the git repository:
git clone email@example.com:chrstnschlnbrg/slim.git yourSite cd yourSite rm -rf .git
npm install gulp gulp-sass gulp-uncss gulp-rename gulp-cssnano --save-dev
Your site is ready to use now.
All your sass files got to
/sass. Files with a _ in front of the filename (e.g. _filename.scss) won't be compiled unless you include them in another file.
sass/_hover.scss sass/_color.scss sass/_width.scss ...
will be included in:
and this file will be compiled to
css/full.css. You can change all file names in gulpfile.js. Sass compiling can be done by typing:
Uncss will compile
css/min.css. You can change the filename in gulpfile.js. Compiling can be done by typing:
The whole Jekyll site will compiled into
site/. This can be done by typing:
The master function will compile your sass, minify it and build your Jekyll site all at once. This can be done by typing:
Jekyll will create a local site at
http://127.0.0.1:4000 by typing:
Now you can also compile your sass everytime you save a file by typing:
If your run these two commands in your terminal you will be able to edit all of your files and get them directly compiled on your localhost server. You should also include
css/full.css in your head instead of
css/min.css while you're developing locally.