给jekyll博客添加天气插件

Posted by Dapenson on April 26, 2020

获取和风插件

和风天气注册之后获取插件代码

准备和风天气插件代码示例如下

<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