Tingkun's Blog

Tingkun @internet behind GFW

新浪微博侧栏widget定制-Octress

Octresss毕竟是国外的人做的,国内服务几乎没加 不过,参照twitter,添加新浪微博侧栏也就是几分钟的事情

定制侧栏的文件放在 source/_includes/asides/下 1. 创建文件weibo.html

source/\_includes/asides/weibo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

<section>
 <p>
<a  id="hover_pop" href="http://weibo.com/tingkunz"  wb_user_id="1769520197" >tingkunz@Weibo<span id="wb_follow_btn"> </a>
  </p>
  <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1166443256" type="text/javascript"> </script>
  <script type="text/javascript">
  WB2.anyWhere(function(W){
      W.widget.hoverCard({
          id: "hover_pop"
          });


      W.widget.followButton({
      //uid: '1769520197',
      uid: '1769520197',
      id: "wb_follow_btn"
        });
      });

  </script>
</section>

  1. 在_config.yml,添加,当然将 weibo_xxx改成你的就ok了
1
2
3
#Sina weibo
weibo_user: tingkunz
weibo_userid: 1769520197

搞定!