zola
zola copied to clipboard
Minify embedded css and js with additional lib flags
IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.
The place to discuss new features is the forum: https://zola.discourse.group/ If you want to add a new feature, please open a thread there first in the feature requests section.
Sanity check:
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Code changes
(Delete or ignore this section for documentation changes)
- [x] Are you doing the PR on the
next
branch?
If the change is a new feature or adding to/changing an existing one:
- [x] Have you created/updated the relevant documentation page(s)?
^ I don't believe any documentation changes are required with the existing documentation mentioning that "the generated HTML files are minified."
Notes
A small fix for #1765. Just two extra config options so that the already included minify-html library also minifies CSS and JS.
Did they change the backing compiler in a minor version?
It appears that in version 0.9.0, minify-html now uses the minify-js rust library to minify CSS and JS. Before 0.9.0, minifing CSS and JS was handled by esbuild-rs, which relied on the Go compiler.
So minify-html just seems to have switched to a lighter weight dependency that removes the Go requirement.
Here is the commit in minify-html where they changed the dependency,
Thanks. I think I will wait a bit till those crates are a bit more tested and will merged that for 0.17 rather than 0.16