GithubHelp home page GithubHelp logo

Comments (18)

chenzhutian avatar chenzhutian commented on July 26, 2024

最近hexo升级了新版本,然后有个bug,会编译不了
我之前去查了issue发现还没fix,不知道现在好了没有,我再跟进

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

简单调试了下,看起来 OptimizeHTML 好像根本就没有执行的样子。

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

https://github.com/hexojs/hexo/blob/master/lib/extend/filter.js#L58
我在这里加了一行调试代码:

console.log('#### Debug #### Call exec', type, data, options);

发现输出的内容里根本找不到<html

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

感觉现在好像没法拿到完整 html 了- -

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

@Cat7373 你的node的版本和all-minifier的版本是?
我最近update了一下,在es6下应该没问题

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

今早用下面的命令安装测试的

npm install hexo-all-minifier --save

环境:Windows 10 64bit+Git v2.8.3+NodeJS v6.2.1+Hexo v3.2.0
测试方式:hexo server

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

看了一下,这么安装后的版本是"hexo-all-minifier": "0.0.14",

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

调用了下hexo clean,发现可以出现html压缩输出了,不过hexo server打开的网页中的html仍然没有压缩。
hexo g的输出结果也没有压缩

INFO  update Optimize HTML: E:\Blog\Hexo\source\_posts\github-hexo.md [ 1.02% saved]
INFO  update Optimize HTML: E:\Blog\Hexo\source\_posts\hexo-test.md [ 31.79% saved]
INFO  update Optimize HTML: E:\Blog\Hexo\source\tags\index.md [ NaN% saved]
INFO  update Optimize HTML: E:\Blog\Hexo\source\categories\index.md [ NaN% saved]

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

网页中仍然有大量的空格与空行

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

@Cat7373 不错我的环境跟你几乎是一样的,我也喜欢把所有版本都升到最新
我今晚来修一下

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

并不是升级到最新- -
我是最近才刚入这个坑- -
Git我是一直用常更新- -
NodeJS``Hexo是前几天才下载的0.0
之前在用gulp来压缩代码的:https://zoakerc.com/archives/minify-static-resources-in-hexo-by-gulp-plugins/

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

至少你是win10不是mac os…

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

经测试发现是theme自带的html没法压缩,md渲染出来的html可以压缩。
这个好像是hexo触发事件的问题,暂时还没找到work around的方法

from hexo-all-minifier.

Cat7373 avatar Cat7373 commented on July 26, 2024

我用的 NexT 主题- -

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

就是after_render:html触发的函数只会传入md渲染出来的html,theme的模板html不会传入进去...

from hexo-all-minifier.

b1ngx avatar b1ngx commented on July 26, 2024

调试了下 OptimizeHTML 没有执行

from hexo-all-minifier.

b1ngx avatar b1ngx commented on July 26, 2024

应该是官方已经修复了这个,hexo 版本 3.2.2

from hexo-all-minifier.

chenzhutian avatar chenzhutian commented on July 26, 2024

@sumjur 好的,过一段时间如果没有别的情况我就close这个issue了

from hexo-all-minifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.