Should I add resources to .gitignore?

I’m using Hugo with the Academic theme, and my site is hosted with Netlify. Can I add resources to my .gitignore file?

It isn’t there by default, so I’m wondering if there’s an important use…

Hi and welcome to the Hugo forums.

Hugo uses the resources folder to store generated images, CSS files etc.

So, this folder just bloats your repository, and it is not needed to deploy your site from a fresh repository clone.

Therefore you should exclude the resources folder.

i have the following on my .gitignore


you can also exclude public if you generate the site on host (like netlify)

1 Like


1 Like