Jekyll Overwriting CSS changes Upon Server Relaunch

I am green as can be. I have been modifying a Jekyll theme that I am running on my MacBook.

I recently upgraded the theme to Bootstrap 4.

I am now have developed a bug of sorts. When I make changes to Bootstraps 4 css files, those changes are reverted when I restart the Jekyll server. I can see it happen in real time. With the css window files open, as soon as I hit return in the terminal window, you can see the css window file revert the code I just changed.

What is causing this?

My guess is you’re editing CSS files in the _site folder. If you’re doing that, don’t.

Everything in that folder gets regenerated by Jekyll every time it builds your site. You want to edit the source files which depending on your setup might be in /assets, /css, /_sass, etc. Without seeing your site source it’s hard to say.

1 Like

Right on the money - I was using search to jump to a specific point in the file but did not realise that I was editing the wrong the file.

Cheers

Another newbie here. What if I don’t have an /_assets directory. There’s only an /assets directory (without the _) inside the _site directory? :o Currently I have only a /_posts and a /_site directory plus some html files in my project directory.