项目作者: lete114

项目描述 :
Hexo resources compress HTML,CSS,JS (Hexo博客压缩,支持HTML、JS、CSS)
高级语言: JavaScript
项目地址: git://github.com/lete114/hexo-minify.git
创建时间: 2021-01-19T06:32:47Z
项目社区:https://github.com/lete114/hexo-minify

开源协议:

下载



语言: 中文
English

Hexo-minify

Hexo-minify 是一款 Hexo 压缩插件,它可以压缩 HTML、CSS、JS、Font、Image(jpg,png,gif,webp,svg)

安装

  1. npm install hexo-minify --save

说明

如需修改,可在 Hexo 配置文件内编辑覆盖

如果仅安装插件,并未填写相关配置,则使用以下默认配置信息

  1. ## Hexo-minify Default Config Options
  2. minify:
  3. preview: false ## 本地预览时是否压缩
  4. exclude: ['*.min.*']
  5. js:
  6. enable: true
  7. sourceMap:
  8. enable: false ## 生成 sourceMap
  9. ## 将 sourceMappingURL 插入压缩后的 js 文件,如果为 false 则需要在浏览器开发者工具中手动添加 sourceMap
  10. sourceMappingURL: false ## //# sourceMappingURL=xxx.js.map
  11. ## 详细配置: https://github.com/terser/terser#minify-options
  12. options: {}
  13. css:
  14. enable: true
  15. ## 详细配置: https://github.com/clean-css/clean-css#compatibility-modes
  16. options: {}
  17. html:
  18. enable: true
  19. ## 详细配置: https://github.com/kangax/html-minifier#options-quick-reference
  20. options:
  21. minifyJS: true # Compressed JavaScript
  22. minifyCSS: true # CSS Compressed
  23. removeComments: true # Remove the comments
  24. collapseWhitespace: true # Delete any extra space
  25. removeAttributeQuotes: true # Delete attribute quotes
  26. image:
  27. enable: true
  28. svg:
  29. enable: true
  30. ## 详细配置: https://github.com/imagemin/imagemin-svgo#imageminsvgooptionsbuffer
  31. options: {}
  32. jpg:
  33. enable: true
  34. ## 详细配置: https://github.com/imagemin/imagemin-jpegtran#options
  35. options: {}
  36. png:
  37. enable: true
  38. ## 详细配置: https://github.com/imagemin/imagemin-pngquant#options
  39. options: {}
  40. gif:
  41. enable: true
  42. ## 详细配置: https://www.npmjs.com/package/imagemin-gifsicle#options
  43. options: {}
  44. webp:
  45. enable: true
  46. ## 详细配置: https://github.com/imagemin/imagemin-webp#options
  47. options: {}
  48. font:
  49. enable: false
  50. ## 详细配置: https://github.com/Lete114/fontmin-spider#api
  51. options: {}

Hexo 相关

hexo-theme-MengD

hexo-seo-autopush

hexo-hash

hexo-prefetch