Jekyll is a great tool for building static sites, however, I often see many projects that are including a lot of unused CSS. Since Jekyll generates an entire working site in the _site
directory, we can use it to run uncss
. Below outlines an example project using uncss
and a build.js
script.
Note: this assumes you have node
and npm
installed.
Firstly, let's set up the project.
jekyll new uncss-example && cd uncss-example