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;

Grunt + Jekyll + LESS 1/3
bnrpemwiinnssttaallll-ngodgerunt-cli

So now what? I needed something which would do the following …

  1. Compile the LESS files
  2. Combine all of the CSS files into one
  3. Minify the resulting CSS files
  4. 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β†—  ….

Grunt Example↗

My configuration currently looks like ….

packages.json

Grunt + Jekyll + LESS 2/3
{}β€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œβ€œ}nvdahldggggggglaeeuoierrrrrrromrstmcvuuuuuuuaescheeDnnnnnnnd”iropnettttttt-:oirasp”------gnp”gee:ccccjcrβ€œβ€t:e”nooooeoum:i”:dβ€œnnnnknneoβ€œ:e~ttttyttdβ€œnRβ€œn0rrrrlr-i0”uβ€œβ€c.iiiilita.:sh,i4bbbb”bag0ste.----:-sl.β€œts5ccwlcka1TMp””osaeβ€œoss”hc::,nsts*n”s,eK/cmcs”n:ee/{aih”,esMnmtn”:cβ€œβ€ede””t*,drd::β€œβ€β€iii:*:acaβ€œβ€œβ€k-*β€œ*,β€œGg”*”*l<l,”,”ara,,susssses.s@emsJc/ek"ke,ynldlriscikt.ei”o,>”,

Gruntfile.js

Grunt + Jekyll + LESS 3/3
ml}rggg}ogpedocyo}fβ€œ}}}ccsβ€˜]d}}ccsd}}jos}dodc}}}wol}cft}hftos}}}csopb}}})errr;drksepoup,i_,osr_,e,ssre,epr,ipeo,api,sia,tiapp,oepoa,;quuuuugsvtmitlcnsccssscsktcstsnttvslsmlstanrtrsunnnln::eipciesc::stm::tyi:titfcie:eklekiwnviteitttetloromssas:i:lo:o:ihorss:ssoneeo::r.....g{onemi:/t{[/n{β€˜lnβ€˜ng:ne{::::n:crnerrreirpsspzm:*β€˜:cβ€˜:s.{sβ€˜:sl{st:s8β€˜(eeexnum:sra{a’csc:’:.{:o[[[[:f::0.β€˜gggpine:eti{s{ss{/β€˜aβ€˜β€˜β€˜β€˜a{0/liiiottn{sins/s{{__{d_l*j{l{{0_osssrC.ttso./m/sc:ce.es,sattttof:r:ncmamiosshkeideeesniu:saiatntssty,t-rrrfl{etsiniefr/’mlegTTT=ie,r2”n.n’iu*,ll’raaag.u:.c.,ge’’’usssf(recsm-,,β€˜,]nkkku{e,β€œssidc,t(((na_s’neβ€˜oβ€˜-β€˜β€˜β€˜cdl’,.v_n_tdcstJec.lciaeseiSssyeansfsroOssmstcka’vnN/’ls:lsu,e((m’/cu’lrgβ€˜a*sd)t[’rpi’se(β€™β€˜,uan]’sg,lnc.,,/re[tkl*u[sβ€˜)aeβ€˜.nβ€˜scgschtl’o{esst)e,n.”sm;snjmlsβ€˜esi’’ccon,,otn:n’’cβ€˜β€˜c,)s_ca,slotβ€˜β€™an:w]yccaoastutsct:’hsc,’/s]*sβ€˜).’c;h,stsmβ€˜mlci’sn,s:mcβ€˜is_nsp:’oc]ss)ts;s’/,*β€™β€˜]j,ekyll’]);

The following posts helped me get to where I am at the moment;

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.