Hugo copies entire content directory before processing it

well, I have no idea where to put that.

I noticed that, on my website, hugo will copy the entirety of the content/ directory into public/, before processing it.

So if I copy an entire folder of pictures into content/ but I don’t even have a index.md or _index.md yet, hugo will still copy it. That makes the website unnecessarily heavy. (Other websites I have build with Hugo don’t do that)

How to prevent that ?

Hugo is doing exactly what it should be doing.

content/
├── foo/
│   ├── a.jpg
│   └── b.jpg
└── _index.md

The files inside of the “foo” directory are page resources.

No, it doesn’t. It doesn’t copy page resources when the ResourceType is page (e.g., .md, .adoc, .html, .pdoc, .rst, .org).

I doubt that.