Skip to content

uiolee/hexo-htmlnano

Repository files navigation

hexo-htmlnano

GitHub Tag GitHub Release GitHub commits since latest release GitHub top language Coverage Status CI Libraries.io dependency status for GitHub repo

Minify HTML files with htmlnano

Install

NPM Version node-lts NPM License NPM Downloads NPM Downloads Libraries.io dependency status for latest release

pnpm add @uiolee/hexo-htmlnano

# npm i @uiolee/hexo-htmlnano

Configuration

Default Configuration

Defined in src/index.ts

hexo_htmlnano:
  enable: true
  priority: 999
  exclude: []
  presetName: "safe"
  htmlnanoOptions:
    removeEmptyAttributes: false
    collapseWhitespace: "conservative"
  postHtmlOptions:

Customize

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.