-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add minify config #6990
Add minify config #6990
Conversation
[mod] Update github.com/tdewolff/minify [minifiers] New config.go [docshelper] Add func merge DocProviders [docs] update docs.json
This looks really good. I have 3 comments:
|
Thanks for comment, @bep 1 & 2 are done Please note that #6621 is not solved even by merging this because I admit that I am also not so confident about 3 but let me explain.
Minification of That is my intention but it is so vague as specification that I have just added a test case and improved the error message. Second,
It is possible to separate
|
Thanks for this. I think we need to settle 3 before we can wrap this. { { $xml := $xml | minify }} I think I would expect the above to just silently drop the minify statement if I disable minify, that statement could well live in a theme I don't control. But you are probably right (?) about having 1 disable for both of these. We can consider adding some flag later if needed. |
I can see enabling/disabling is made by Type so it seems very controllable. I'm not familiar with mifnication technology. I'm simply curious of what happens if a CSS file's minified
is printed in an HTML file. I suppose if CSS minification is disabled, but HTML is not, then the HTML minification will take care of minifying the CSS? |
Not if you include it in style tags (which I assume you should/would). |
You are right @bep . I failed to be careful for |
This looks really good now, thanks a lot. I will pull this and apply some adjustments. |
I will complete this in #7077 |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
related #6750
This PR enables users to turn on/off by minifier types and to configure
minify
with its optionsThis is proposal and any comments and suggestions are welcome
content
Update github.com/tdewolff/minifyrelated issues
FixesUpstream Keep single/double quotes in--minify
#6621edit:
By downgrading
minify
version, #6621 became an upstream issue