Un-minify HTML code at the public folder

This is a small solution of un-minify the HTML files at the public folder.

With just one command you can minify the HTML files at the public folder.

hugo --minify

Need more automation?

you can add minify = true in the config.toml file

That will get the job done of auto minification of each hugo run.

So, What if you want to unminify now?

Do you want to see the clean HTML source files at the public directory?

If you added minify parameter added at the config file, make it as false. The code will be

minify = false

Now, Just run this code… this will create a clean slate of Hugo regenerating from the scratch.

hugo --cleanDestinationDir

That’s all from my side.

If you got any better solution, I’m all ears :slight_smile:

Thanks so much for each and everyone for all your great work.

1 Like