mzlogin.github.io icon indicating copy to clipboard operation
mzlogin.github.io copied to clipboard

压缩 HTML,进一步提升加载速度,参考

Open mzlogin opened this issue 4 years ago • 2 comments

https://zhang0peter.com/2020/01/27/jekyll-inline-css/ https://mayanbin.com/post/compress-html-in-jekyll.html http://jch.penibelst.de/

mzlogin avatar May 02 '20 03:05 mzlogin

压缩 HTML 过程中出现过两种问题:

Uncaught SyntaxError: Unexpected end of input

原因是内嵌 js 里有 // 注释

Uncaught SyntaxError: Unexpected identifier

原因是内嵌 js 里表达式没用 ; 结尾,压缩后报错

mzlogin avatar May 03 '20 00:05 mzlogin

可以考虑将搜索使用的 json,通过 ci 推到别的分支,然后通过 jsdelivr 引用。

mzlogin avatar May 28 '20 15:05 mzlogin