theme-next / hexo-filter-optimize

A Hexo plugin that optimize the pages loading speed.
MIT License
45 stars 2 forks source link

添加插件后fontawesome图标失效 #8

Closed liolok closed 4 years ago

liolok commented 6 years ago

这是添加插件的commit: https://github.com/liolok/liolok.github.io/commit/0f2d79f8e4bdcb2ca6b395cecdb95a92a5f525f4

这是问题截图: image

anbuchelva commented 6 years ago

i confirm the same. enabling css optimization breaks the font awesome icons. Need help on the same.

Thanks!

anbuchelva commented 6 years ago

fixed it by adding this line - sed -i'' "s~../fonts/~lib/font-awesome/fonts/~g" themes/next/source/lib/font-awesome/css/font-awesome.min.css in the .travis.yml

liolok commented 6 years ago

@anbuchelva as for me, i turned out to use gulp for compressing, but honestly I feel like all these methods(this module, hexo-all-minifier, and gulp-way) don't make my blog faster in Google's speed test.

anbuchelva commented 6 years ago

@liolok github pages doesn't cache your site, you can do it using cloudflare if you have a custom domain. hexo-filter-optimize increased the page score from 70 to 99 for me. the 1% drop is caused by disqus, google analytics, webmaster tools etc.,

liolok commented 6 years ago

@anbuchelva you mean a high score in Google's speed test is based on both compressing and caching?:flushed:

anbuchelva commented 6 years ago

@liolok it depends; check your results the issues and solutions are provided by google.

moeyui1 commented 6 years ago

In my case, I replace the fontawesome css file with CDN, which works for me. Edit theme/next/_config.yml

# Internal version: 4.6.2
# See: http://fontawesome.io/
fontawesome: https://cdn.bootcss.com/font-awesome/4.6.2/css/font-awesome.min.css
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ivan-nginx commented 5 years ago

Similar to #2.

stevenjoezhang commented 4 years ago

See also https://www.guanqr.com/2019/08/20/speed-up-hexo/

荷戟独彷徨
加速 Hexo 博客的方法及遇到的问题
由于我的博客部署在 GitHub Pages 上面,服务器在美国,在中国访问的话部分地区的加载速度比较慢。因此我在 6 月份的时候尝试使用 hexo-service-worker 与 hexo-filter-optimize 插件加速网站的访问速度。这两款插件确实对博客的加载速度有所帮助,但在当时我并没有留意博客内部的一些变化,直到最近,一个很严重的 BUG 暴露了出来。通过对插件的逐个排查,终于
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stevenjoezhang commented 4 years ago

因为fontawesome加载字体用的是相对路径。懒得解决了,各位将就用吧。