Whitespaces even in a minified build?

When I build I’m getting some serious white spaces, is there a solution to this?:
image

  1. Do you use hugo --gc --minify when building?
  2. Is this a file in the “public” folder? Only the public folder gets minified…otherwise it would be impossible to work on your code.
  3. Did you already deploy it so that we can see a public facing version?

Sorry I should have posted my build settings hugo --minify --config Should I use your settings?

Yes that’s the public folder of my source index.html.

I just checked the server and it looks okay, but I don’t know if webservers strip whitespaces automatically as part of their schema:
image

Try just hugo --minify on it’s own. I don’t see how this wouldn’t work.

The config is my config file, that’s fine. But you can see this is my index. Is there supposed to be this much whitespace?

If this is the index.html in the public/ folder, this is definitely not minified. Do you have a git repo for us to look at?

Are you trying to reduce whitespace in unminified output? (–minify should take care of this for production)

If so take a look a {{- and -}} in your templates. The first strips whitespace in front of and the latter from after the template code.

Much easier to help you if we can replicate your issue. Please provide a link to your site code repo.

{{- bla -}} will strip whitespace before and after a go template tag. you can use it one sided and it strips only on that side.