添加helper-live2d模型插件,为个人博客添加live2D看板娘。
插件地址:github
hexo-helper-live2d
1. 添加模块
1
2
| $ npm install --save hexo-helper-live2d
$ cnpm install --save hexo-helper-live2d
|
2. 下载模型:使用最简单的方法
模型地址
模型名:
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
|
使用方法:使用 npm install 模型名
来安装,此处以unitychan做例子
1
2
| $ npm install live2d-widget-model-unitychan
$ cnpm install live2d-widget-model-unitychan
|
3. hexo配置
向hexo的_config.yml
文件添加配置
PS:不是yilia主题的_config.yml
,是hexo的_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| live2d:
enable: true
scriptFrom: local
pluginRootPath: live2dw/
pluginJsPath: lib/
pluginModelPath: assets/
tagMode: false
debug: false
model:
use: live2d-widget-model-unitychan
display:
position: right
width: 150
height: 300
mobile:
show: true
|
需要配置的是use: live2d-widget-model-unitychan
,此处以unitychan做例子
配置结束