Duplicate, sequenced index.html files

when i render my site, the first time, i get an index.html file in each folder. but subsequent times, the file will be called index(1).html, index(2), etc…. and the previous files are not being replaced.

Not sure why it is doing this… any suggestions?

thanks in advance!

That naming convention is used by many Windows programs (edge, explorer) when you try to copy a file to a target folder and there’s already a file there with the same name.

I have never seen Hugo itself to behave like that… It either overwrites/recreates the file or complains about permissions.

My educated guess is, that you have something around the Hugo build that produces that behavior.

Following Requesting Help - Let us see your Code you should provide more details on your setup

  • share your (or a reproducible) repo
  • output of hugo env
  • anything happening around the bare hugo call
    • Theme involved
    • some custom build scripts

a first try could be to remove the public folder completely and retry a build