Skip to content
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

Implement CSS minification #367

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

RoneoOrg
Copy link
Collaborator

@RoneoOrg RoneoOrg commented Jan 21, 2021

Hugo Pipes allow the minification of CSS assets

This branch is an implementation of this feature.

Key advantages:

  • every single CSS file is now minified
  • half of them are also concatenated
  • as the minification is done on the fly, previously minified files are now shipped unminified. The CSS files are easier to analyze and customize

The default behavior is set to use selfHosted files instead of CDNs, as it's required to take advantage of the minification.

Carefully tested with: Hugo 0.56 basic , Hugo 0.80.0 basic and Hugo 0.80.0 extended

@RoneoOrg
Copy link
Collaborator Author

The CSS used in shortcodes in now minified too

@RoneoOrg
Copy link
Collaborator Author

TODO: Potential improvement: make the minification optional via a Param in config.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant