Hexo-theme-next: 发现博客打开慢,看了看是谷歌字体的问题

Created on 2 Apr 2016  ·  10Comments  ·  Source: iissnan/hexo-theme-next

请问怎么更改为其他的字体源

Most helpful comment

给大家推荐一个工具,测试网页加载性能的,http://tools.pingdom.com/fpt/ 我刚测了一下我的博克,有如下结果。我是在法国测得,我的瓶颈在baidu的push和share代码,我觉得我有必要优化一下啊。

http://tools.pingdom.com/fpt/#!/eBVFVg/http://hui-wang.info/2016/02/25/%E5%BD%93%E7%A8%8B%E5%BA%8F%E5%91%98%E8%80%81%E4%BA%86/

image

All 10 comments

@luozongtong123 请问您是依据什么推断出来是字体的问题?

@luozongtong123 在 5.0.0 中需要更改模板 layout/_partials/head.swig,搜索 fonts.googleapi,替换成你需要使用的 cdn

@huiwang 昨天我发现很慢,分析性能后发现这个请求
https://fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext
占用很大时间。
今天看又正常了。很奇怪

@iissnan 谢谢

@luozongtong123

替换成这个吧:
http://fonts.useso.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext

google字体我记得国内其实不墙的。。但是有时候又确实是被这个字体拖累了。很奇怪。

给大家推荐一个工具,测试网页加载性能的,http://tools.pingdom.com/fpt/ 我刚测了一下我的博克,有如下结果。我是在法国测得,我的瓶颈在baidu的push和share代码,我觉得我有必要优化一下啊。

http://tools.pingdom.com/fpt/#!/eBVFVg/http://hui-wang.info/2016/02/25/%E5%BD%93%E7%A8%8B%E5%BA%8F%E5%91%98%E8%80%81%E4%BA%86/

image

后续版本会开放一些字体的自定义,感兴趣的可以先看看这个 commit

还有个gstatic也是慢的出奇,在哪里替换呢

现在useso也停止服务了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ifyour picture ifyour  ·  4Comments

online picture online  ·  3Comments

winterrain5 picture winterrain5  ·  4Comments

YorksonChang picture YorksonChang  ·  3Comments

iTofu picture iTofu  ·  4Comments