layout: post
title: 给博客添加天气插件
date: 2020-04-26
author: Dapenson
header-img: img/post-bg-debug.png
catalog: true
tags:
- 天气
- 博客
- 插件
获取和风插件
在和风天气注册之后获取插件代码
准备和风天气插件代码示例如下
<div id="he-plugin-standard"></div>
<script>
WIDGET = {
CONFIG: {
"layout": 2,
"width": "230",
"height": "270",
"background": 1,
"dataColor": "FFFFFF",
"language": "zh",
"borderRadius": 5,
"key": "1111111111111111111111111111"
}
}
</script>
<script src="https://widget.heweather.net/standard/static/js/he-standard-common.js?v=1.1"></script>
将插件插入到网页
将产生代码添加到网站目录文件下的_layouts
~page.html