Skip to Content
PluginsAll Minifier Resource Compression

Resource Compression

In the theme code of %%%%%, HTML, CSS, JavaScript, and image files are not packaged and compressed.

If you want to package and compress these files, you can use the plugin hexo-all-minifier to solve this issue, which can effectively reduce the website’s loading time.

hexo-all-minifier integrates html-minifier, clean-css, uglify, and imagemin, and it is easy to configure.

Configuration

Install the Plugin

In the root directory of your Hexo project, install hexo-all-minifier by executing the following command:

npm install hexo-all-minifier

Modify the Configuration File

In the Hexo site configuration file _config.yml, add the following configuration item:

_config.yml
all_minifier: true

If you encounter any issues or want to perform more detailed settings when using the plugin, please refer to the plugin’s documentation.

Last updated on