
Yet Another Minifier. Minify static web assets and compress using brotli and zstd.
Hexo is a popular framework for building static websites, and with the introduction of the hexo-yam plugin, there’s now a powerful tool available for optimizing site performance. This plugin allows users to minify various web assets, such as HTML, CSS, JS, SVG, XML, and JSON, improving loading times and overall site efficiency. With support for compression formats like gzip, brotli, and zstd, users can achieve excellent optimization results, making this plugin a must-have for anyone looking to enhance their Hexo projects.
The installation and configuration process is straightforward, allowing users to enable or disable features as needed. The plugin prioritizes usability while providing detailed options for those who want to drill down into specific configurations. Let’s take a closer look at the standout features that make hexo-yam an essential addition to your Hexo toolkit.
Minification Support: Effectively minifies HTML, CSS, JS, SVG, XML, and JSON to streamline web assets, leading to quicker load times.
Comprehensive Compression: Offers gzip, brotli, and zstd compression methods to further reduce file sizes and improve site performance.
Flexible Configuration: Each component (HTML, CSS, JS, etc.) can be individually enabled or disabled, letting users customize their optimization strategy.
Verbose Output: Option to enable verbose logging helps users track the minification and compression processes, providing better insight into operations.
File Exclusion Patterns: Supports wildcard pattern matching for excluding files from minification and optimization, enhancing user control over asset management.
Optimization Levels: Users can set various optimization levels for CSS, ensuring that minification aligns with their needs without sacrificing quality.
Priority Settings: Each plugin feature can have its execution priority adjusted, allowing for tailored performance tuning and compatibility with other plugins.
Glob Options: Advanced globbing options are available, assisting users in targeting specific files or directories for inclusion or exclusion during optimization processes.

Hexo is a static site generator built with Node.js that enables developers to create fast and efficient websites using Markdown, EJS, and Stylus. It offers features such as server-side rendering, plugin support, and easy deployment to hosting services like GitHub Pages and Netlify.