惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
V
Visual Studio Blog
雷峰网
雷峰网
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
C
Check Point Blog
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
D
Docker
IT之家
IT之家
博客园 - 聂微东
腾讯CDC
U
Unit 42
Microsoft Security Blog
Microsoft Security Blog
The Cloudflare Blog

Hexo - 标签 - cywhat's blog

hexo迁移需要进行安装的一些依赖 解决hexo图片不展示问题 hexo d -g 部署失败 怎么让你的个人博客可以在百度谷歌搜索到 hexo+netlify+git+个人域名搭建博客 hexo修改新建文章的默认字段 hexo删除文章 hexo管理多个标签
hexo优化加载速度
cywhat · 2021-07-14 · via Hexo - 标签 - cywhat's blog

注意该方法利用插件更改配置,如主题中有Google字体导致加载缓慢,请移步其他内容

利用插件 hexo-all-minifier

安装插件

1
npm install hexo-all-minifier --save

如果安装失败,请使用cnpm

1
cnpm install hexo-all-minifier --save

更改Hexo配置

加入如下配置:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#启用all_minifier
all_minifier: true
# html压缩
html_minifier:
  enable: true
  ignore_error: false
  exclude:

# css压缩
css_minifier:
  enable: true
  exclude:
    - '*.min.css'
    
# js压缩
js_minifier:
  enable: true
  mangle: true
  compress:
  exclude:
    - '*.min.js'
js_concator:
  enable: false
  bundle_path: '/js/bundle.js'
  front: false
  silent: false

# 图片优化
image_minifier:
  enable: true
  interlaced: false
  multipass: false
  optimizationLevel: 2
  pngquant: false
  progressive: false

重新发布

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏