mythsman / hexo-douban

:cd: a Hexo plugin that helps you generate content for Douban books, movies, music, and games.
MIT License
455 stars 57 forks source link

hexo-douban 2.3.2 渲染错误 #174

Closed AlliotTech closed 4 months ago

AlliotTech commented 4 months ago

node 版本: nodejs 20.12.2

hexo 版本: "hexo": "^7.2.0",

hexo-douban 版本: hexo-douban 2.3.2

douban id :

问题描述: NexT version 8.20.0

console: 
Uncaught SyntaxError: Unexpected token ')'

hexo-douban 2.3.2 版本的生成文件似乎有问题

image
mythsman commented 4 months ago

唉,重构一把一堆坑😮‍💨

AlliotTech commented 4 months ago

别慌 哈哈哈 生成后的文件压缩了,没去细看代码,

{value:void 0)

似乎是}没对应

mythsman commented 4 months ago

你有没有引一些奇奇怪怪的压缩插件?我这里生成的是正常的,不知道为啥到你那边 } 没了。。。

AlliotTech commented 4 months ago
"hexo-optimize": "^3.3.0",  
# pnpm install hexo-optimize
# 静态资源压缩
filter_optimize:
  enable: true
  # static resource versioning
  versioning: false
  css:
    # minify all css files
    minify: true
    excludes:
    # use preload to load css elements dynamically
    delivery:
      - '@fortawesome/fontawesome-free'
      - 'fonts.googleapis.com'
    # make specific css content inline into the html page
    inlines:
      # support full path only
      - css/main.css
  js:
    # minify all js files
    minify: true
    excludes:
    # remove the comments in each of the js files
    remove_comments: false
  html:
    # minify all html files
    minify: true
    excludes:
  # set the priority of this plugin,
  # lower means it will be executed first, default of Hexo is 10
  priority: 12

只有这一个

mythsman commented 4 months ago

的确,加了这个我也寄了。。。

mythsman commented 4 months ago

把html.minify关了好像就好了。。。

mythsman commented 4 months ago

升 2.3.3 兼容了一把。

AlliotTech commented 4 months ago

nice ! 测试已正常