Registry / testing / hexo-htmlnano-mini

hexo-htmlnano-mini

JSON →
library2.0.1jsnpmunverified

A Hexo plugin that minifies HTML, inline CSS, and inline JS using htmlnano. Current version 2.0.1. It is released on an as-needed basis. Key differentiators: designed as a drop-in replacement for hexo-html-minifier with additional control over minification options (collapseWhitespace, removeComments, inline CSS/JS minification). Supports exclusion patterns and per-file size reduction logging.

npm install hexo-htmlnano-mini
INSTALL
IMPORT
SIG · HEXO-HTMLNANO-MINI
H
hexo-htmlnano-mini
testingjavascriptv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
/* No explicit import needed; plugin auto-loads when installed */
Hexo plugins are loaded automatically upon installation.
configuration
// In _config.yml htmlnano-mini: enable: true collapseWhitespace: conservative removeComments: safe
htmlnano-mini: enable: true
Configuration is YAML, not JavaScript. Must use the key 'htmlnano-mini'.

Install the plugin, enable it in _config.yml with typical settings, then run 'hexo g' to minify HTML.

# Install npm install hexo-htmlnano-mini --save # Configure _config.yml: htmlnano-mini: enable: true enableInDev: true exclude: # - '**/mycss.css' collapseWhitespace: conservative removeComments: safe removeEmptyAttributes: true cleancss: true uglifyjs: true # Generate site npx hexo g
Debug
Known issues
gotchaOnly works during `hexo g`, not `hexo s` development server unless `enableInDev: true` is set.
fix
Set enableInDev: true in _config.yml to enable minification during development.
affects: >=2.0
gotchaConfiguration key must be 'htmlnano-mini' (with hyphen), not 'htmlnano' or 'hexo-htmlnano-mini'.
fix
Use exact key 'htmlnano-mini' in _config.yml.
affects: >=2.0
Errors
Common errors & fixes
ERROR Plugin load failed: hexo-htmlnano-mini
Plugin not installed or incorrect package name.
fix
Run 'npm install hexo-htmlnano-mini --save' in your Hexo project root.
WARN No configuration found for hexo-htmlnano-mini. Skipping.
Missing or misnamed configuration key in _config.yml.
fix
Add 'htmlnano-mini:' section with 'enable: true' to _config.yml.
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
hexo-htmlnano-mini — npm install hexo-htmlnano-mini · libregistry