--minify doesn't work in 0.78.1


I updated Hugo with Choco to version 0.78.1 (0.78.2 not yet in Choco).
running hugo --minify doesn’t minify any HTML at all (neither locally or on Netlify).

Don’t you experience that too ?

I am unable to reproduce your findings. hugo --minify is working as expected.

Can you share your site configuration?

Hi, thx for your help.
It looks like this setup did the thing.

  minifyOutput = true

and hugo --minify

Is it really that simple ?

So I have to apologize for this stupid thread.

You don’t need specify anything related to minify in your site config. Here’s the site config for my test site:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "Test"

When I run hugo --minify the output is minified.

Thanks for your help !!!

In fact: setting minifyOutput will override any build parameter.

hugo --minify won’t impact output when minifyOutput = false.

So I removed minifyOutput from my config and hugo serves normal HTML while hugo --minify serves minified HTML.

Clever (Hugo is, not me).
Thanks again for your time.

1 Like

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