hexo+yilia添加live2d看板娘


添加live2d看板娘,插件:hexo-helper-live2d,github仓库:https://github.com/EYHN/hexo-helper-live2d

右下角:可爱小黑猫🐱
file

安装

1.安装插件

运行命令npm install --save hexo-helper-live2d

$ npm install --save hexo-helper-live2d

> core-js@2.6.10 postinstall H:\Hexo\node_modules\babel-polyfill\node_modules\core-js
> node postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> core-js@2.6.10 postinstall H:\Hexo\node_modules\babel-runtime\node_modules\core-js
> node postinstall || echo "ignore"


> live2d-widget@3.1.4 postinstall H:\Hexo\node_modules\live2d-widget
> opencollective-postinstall

Thank you for using live2d-widget!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/live2d-widgetjs/donate


> hexo-helper-live2d@3.1.1 postinstall H:\Hexo\node_modules\hexo-helper-live2d
> opencollective-postinstall

Thank you for using hexo-helper-live2d!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/hexo-helper-live2d/donate

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"})

+ hexo-helper-live2d@3.1.1
added 277 packages from 109 contributors and audited 25235 packages in 255.268s
found 20 vulnerabilities (7 low, 6 moderate, 6 high, 1 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

2.选择模型

可到https://huaji8.top/post/live2d-plugin-2.0/预览效果。

命令为:npm install live2d-widget-model-模型名,模型为可参考上面的预览内容。

安装模型:

$ 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或者是主题的配置文件中添加:

# 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下的配置信息即可。

文章首发于:hexo+yilia添加live2d看板娘

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值