theme-shoka-x / hexo-lightning-minify

A Hexo plugin that can automatically minify JS, CSS, and HTML files at lightning speed.
GNU Affero General Public License v3.0
4 stars 1 forks source link

如何设置不转换 gif 文件为 webp 格式? #7

Open luhuadong opened 1 week ago

D-Sketon commented 1 week ago

exclude配置有用吗

luhuadong commented 3 days ago

exclude配置有用吗

试了一下,似乎没有效果,配置是这样的:

minify:
  html:
    enable: true
    exclude: # 排除 hexo-feed 用到的模板文件
      - '**/json.ejs'
      - '**/atom.ejs'
      - '**/rss.ejs'
  css:
    enable: true
    exclude:
      - '**/*.min.css'
  js:
    enable: true
    mangle:
      toplevel: true
    output:
    compress:
    exclude:
      - '**/*.min.js'
  image:
    enable: true # Enable image preprocessing and automatic WebP conversion(hexo d)
    options:
      avif: false
      webp: true
      quality: 80
      effort: 2
      replaceSrc: true
    exclude:
      - '*.gif'