As you may have noticed, the website looks different to how it was previously. I decided it was time for a refresh and I wanted to make the design a little more interesting.
While Jekyll & Github pages use SASS the Bootstrap theme I settled for uses LESS . This meant that I needed to compile all of my CSS outside of Jekyll. Most of the articles I found say use either Gulp or Grunt , looking at the syntax of the two I preferred Grunt as it didnβt look like code.
Installation was straight forward enough;
So now what? I needed something which would do the followingΒ β¦
- Compile the LESS files
- Combine all of the CSS files into one
- Minify the resulting CSS files
- Run Jekyll to build the files
After a lot of trial and error I managed to get all of the above plus the ability to have the browser automatically refresh when I change a file, which was niceΒ 😄
You can see what happens when I run grunt server or grunt css in the following asciicast Β β¦.
My configuration currently looks likeΒ β¦.
packages.json
Gruntfile.js
The following posts helped me get to where I am at the moment;
- Jekyll & Grunt setup
- Using Jekyll with Grunt.js (and much more)
- grunt-contrib-watch with LiveReload not working
I plan on adding a few more options to optimise the images and also compile the Javascript into something a little more discrete, eventually you can read it here.