更新日志
2021.7.12:修复bug,适配3.8.1
效果
方法
前往和风天气生成一段代码。
你会得到一段类似这样的代码:
记录下你的key
添加weather.pug
前往ROOT\themes\butterfly\layout\includes
新建weather.pug,填入下列代码:
#he-plugin-standard
script.
WIDGET = {
"CONFIG": {
"layout": 1,
"width": "100%",
"height": "230",
"dataColor": "ffffff",
"background": 1,
"borderRadius": "!{theme.weather.radius}",
"modules": "01",
"key": "!{theme.weather.key}"
}
}
script(src='https://cdn.nesxc.com/js/he-standard-common.js')
修改index.pug
打开ROOT\themes\butterfly\layout
修改index.pug
在include includes/pagination.pug
这段的代码后面添加:
diff
+postUI
include includes/pagination.pug
if theme.weather.enable
+ .recent-weather(style='width:100%;height:230px')
+ include ./includes/weather.pug
成品
+postUI
include includes/pagination.pug
if theme.weather.enable
.recent-weather(style='width:100%;height:230px')
include ./includes/weather.pug
修改_confing.butterfly.yml
添加下列代码:
#天气插件
weather:
enable: true #开关
radius: 8 #圆角-越大越圆
key: youkey #key
把上述代码中的youkey换成你之前生成代码的key即可。
生成
正常的hexo三连就可看到效果了哦~
© 版权声明
THE END
暂无评论内容