效果如下所示

卸载原版时钟
在博客根目录[Blogroot]下打开终端,运行以下指令
1 2
| npm uninstall hexo-butterfly-clock
|
安装新版插件
安装插件,在博客根目录[Blogroot]下打开终端,运行以下指令:
1
| npm install hexo-butterfly-clock-anzhiyu
|
添加配置信息
可以写在在站点配置文件_config.yml或者主题配置文件_config.butterfly.yml中
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
electric_clock: enable: true priority: 5 enable_page: all exclude: layout: type: class name: sticky_layout index: 0 loading: https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/loading.gif clock_css: https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.css clock_js: https://cdn.cbd.int/hexo-butterfly-clock-anzhiyu/lib/clock.min.js ip_api: https://widget.qweather.net/simple/static/js/he-simple-common.js?v=2.0 qweather_key: gaud_map_key: default_rectangle: false rectangle:
|
其中qweather_key 和gaud_map_key 最好自己去申请对应的 api key