How to build bootstrap css with jekyll?

To accomplish that minor modification with my custom Bootstrap, I would have to re-download Bootstrap, pick out the code bits I want, hope they are accurate, link to them, test the feature to make sure I got it right, and then hope I didn’t miss anything. Or, I would re-download Bootstrap to my site, add the component, test it, and then re-purge unused code. Also, I would have to download the correct version of Bootstrap, which I used before, or risk my custom Bootstrap being a custom Bootstrap with mingled-in versions of Bootstrap.

Actually if you set up a build system using, for instance, GitHub actions, this can be done automatically. We have this set up in a template repository for GitHub pages. We basically build the page and then run PurgeCSS to clean it before uploading it.

Hi @george-gca, Yes, I suggested PurgeCSS as a potential option. I looked at your GH Action, and it seems like a nice and clean way to maintain a production-level site!

Anyone reading this should know that PurgeCSS and GitHub Actions are not required when following my instructions.

1 Like