Can I always delete resources/_gen?

Which is to say, delete resources because the only thing ever there is a subdirectory _gen? Can I delete from both the site and the theme?

It sort of makes managing things with git harder. It’s always getting added to the working set, which has to be staged and committed if desired. Or removed from unstaged, and the deletion has to be added and committed.

I can put in gitignore, rendering them “harmless” but I’d just as soon not have it at all. They contents are just a couple of compiled scss files. It’s just no biggee to redo it all the time for local build and test with hugu server.

It’s not clear it helps Render or CloudFlare as they re-clone the whole repo. Not clear what stays around in their build cache, if anything. (Both are sort of black boxes).

If I had tons of image resizings then it might make more sense.

I have brutally slashed these directories and there has never seemed to be any harm.

Can I prevent them from even being generated? (assume so …I am looking through all the build settings next).


But you can safely delete them (there are reasons to keep them, as you have pointed out).

OK. I’ll just put in gitignore and forget about it.

A related tip would be to run hugo --gc to remove unused items (to save disk space).

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.