getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
14.23k stars 971 forks source link

Support minification only for the build #1924

Open savchenko opened 2 years ago

savchenko commented 2 years ago

Adding minify_html = true enables minification globally, for zola serve as we as the build option.

I would like to propose an additional flag (e.g. minify_html = build_only) so that it happens only during the build.

ogarcia commented 1 year ago

Another possible option to address this is to add a --minify modifier to the build command.

stellarpower commented 1 month ago

I generally have two separate parallel configs, one for serving, and one for building. I then regenerate those using a script, seeing as TOML doesn't support including another file.

Not exactly a solution, but just mentioning as I think it's possibly the more portable option.

Another way might be config overrides in the CLI, which would be less work than tailoring flags as I'm sure there are more usecases, and it's nice not to have a whole load of options to look through in the help output.