Minify config tutorials

Hello, i just found that we can use minify in config but i didn’t find any tutorials for that or any article that explain it more can someone please help

I don’t know if you can “use minify in config”, but I know you can “configure the minify via config file”.

See asset minification to actually “use it”.

1 Like
1 Like

i tried this on my head partial and called the css files but it failed to build i think the problem is from my theme it’s really old

so just adding this lines to my config.toml file will make it work ? or do i have to make some other modifications

  disableCSS = false
  disableHTML = false
  disableJS = false
  disableJSON = false
  disableSVG = false
  disableXML = false
  minifyOutput = false
      decimals = -1
      keepCSS2 = true
      keepConditionalComments = true
      keepDefaultAttrVals = true
      keepDocumentTags = true
      keepEndTags = true
      keepQuotes = false
      keepWhitespace = false
      decimals = -1
      keepWhitespace = false

As I said, those lines will only configure the minification behavior. You must “invoke” the minification, by using asset minification function and/or hugo --minify.