https://huaji8.top/post/live2d-plugin-2.0/ 预览效果。
命令为:npm install live2d-widget-model-模型名
,模型为可参考上面的预览内容。
安装模型:
1 2 3 4 5 6 7
| $ npm install live2d-widget-model-hijiki npm WARN babel-eslint@10.0.2 requires a peer of eslint@>= 4.12.1 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ live2d-widget-model-hijiki@1.0.5 added 1 package in 52.155s
|
3.配置
站点的配置文件_config.yml
或者是主题的配置文件中添加:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| # Live2D ## https://github.com/EYHN/hexo-helper-live2d live2d: enable: true scriptFrom: local pluginRootPath: live2dw/ pluginJsPath: lib/ pluginModelPath: assets/ tagMode: false debug: false model: use: live2d-widget-model-hijiki # 模型:https://huaji8.top/post/live2d-plugin-2.0/ display: position: right width: 150 height: 300 mobile: show: true
|
注意这里的use参数是上面安装的那个模型全名
4.效果图
可爱的小黑猫已上线。如果不起效,一般需要重新生成hexo clean & hexo g
。

补充
取消看板娘
将配置中的enable
设置成false
即可。
卸载插件
运行命令下载插件,删除配置信息:
1.卸载模型:npm install live2d-widget-model-模型名
2.卸载live2d插件:npm uninstall hexo-helper-live2d
3.去掉站点_config.yml下的配置信息即可。
【转载】https://www.yansheng.xyz/article/e239dc63.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Lete乐特's Blog !