Minify HTML files with htmlnano
pnpm add @uiolee/hexo-htmlnano
# npm i @uiolee/hexo-htmlnano
Defined in src/index.ts
hexo_htmlnano:
enable: true
priority: 999
exclude: []
presetName: "safe"
htmlnanoOptions:
removeEmptyAttributes: false
collapseWhitespace: "conservative"
postHtmlOptions:
name | default | type | note |
---|---|---|---|
enable | true |
boolean | set false to disable this plugin. |
priority | 999 |
number | define the priority of this plugin. Lower priority means that it will be executed first. |
exclude | [] |
array<glob> | Exclude files from being minified. Support globbing patterns. |
presetName | "safe" |
string | the name of htmlnano#Preset. |
htmlnanoOptions | see src/index.ts#L10 | object | see htmlnamo#modules for more. |
postHtmlOptions | see src/index.ts#L20 | object | see posthtml#usage for more. |