Hexo 给博客添加宠物

1.先安装live2d
1
npm install --save hexo-helper-live2d
2.选择自己喜欢的萌妹子

可以到github中查看,或查看动态效果选择喜欢的妹子造型

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
live2d-widget-model-chitose
live2d-widget-model-epsilon2_1
live2d-widget-model-gf
live2d-widget-model-haru/01 (use npm install --save live2d-widget-model-haru)
live2d-widget-model-haru/02 (use npm install --save live2d-widget-model-haru)
live2d-widget-model-haruto
live2d-widget-model-hibiki
live2d-widget-model-hijiki
live2d-widget-model-izumi
live2d-widget-model-koharu
live2d-widget-model-miku
live2d-widget-model-ni-j
live2d-widget-model-nico
live2d-widget-model-nietzsche
live2d-widget-model-nipsilon
live2d-widget-model-nito
live2d-widget-model-shizuku
live2d-widget-model-tororo
live2d-widget-model-tsumiki
live2d-widget-model-unitychan
live2d-widget-model-wanko
live2d-widget-model-z16

例如选择: live2d-widget-model-shizuku

3.安装
1
npm install live2d-widget-model-shizuku
4.配置

在站点hexo的 _config.yml 下配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 宠物设置
live2d:
enable: true
scriptFrom: local
pluginRootPath: live2dw/
pluginJsPath: lib/
pluginModelPath: assets/
tagMode: false
log: false
model:
use: live2d-widget-model-shizuku
display:
position: right
mobile:
show: true
scale: 0.5
react:
opacityDefault: 0.7
opacityOnHover: 0.2
5.本地重新启动查看
1
hexo -s

没有问题就可以推送到github上了

1
2
hexo g
hexo d
-------------本文结束感谢您的阅读-------------