How do I use npm/yarn to install a CSS framework to use with a Zola site?

Hello. This is a noob question that I am asking out of curiosity instead of beating my head against a wall.

I ended up following the “Overview” guide and set up a basic blog. I would like to use a CSS framework like Chota with it but I want to provide it locally instead of using a CDN. One thing I can do is put the min.css in static and like to it in the template. But I was wondering if it would be possible to use yarn or npm for that instead because it would make updating much more convenient.

Unfortunately I am not much experienced with either Zola or yarn/npm to figure out how to make them work in tandem but if someone has some tips or some simple instructions to get me started I would appreciate it a lot.

Thanks for taking the time to read this.

1 Like

You can just have a npm script that copies from node_modules to static. You call that script everytime you update the CSS and you should be good to go.

I am doing that but with bash scripts. Thanks a lot for the affirmation. Really helps with maintaining sanity while fumbling in the dark. :slight_smile:

I assumed this would be simple but it’s not really. I ran into this blog post that was immensely helpful though:

1 Like