Geek是在IT行业对那些智力超群且对某样技术有狂热兴趣的人的称号,随着互联网技术在中国逐渐流行起来,中国所谓的各个IT行业的Geek也越来越多。

之所以谈这个不是我自诩为Geek,而是希望中国想搞技术的人都能够像Geek一样专心。

今天来介绍下在Octopress增加侧栏,以新浪微博秀为例子,

首先到微博秀设置自己喜欢的样式,设置完成以后,将代码获得,如果懂html的话应该能明白这是个内联框架

接着在\source\_includes\custom\asides中新建一个weibo.html,最好是放在custom下,有些人喜欢在\source\_includes\asides中修改或者创建,一旦主题换了,那些自己改过的都会消失,这就得不偿失了,在weibo.html中加入以下内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

<section class="well">
  <h1>新浪微博</h1>
  <ul id="weibo">
    <li>
      <iframe 
        width="100%" 
        height="550" 
        class="share_self" 
        frameborder="0" 
        scrolling="no" 
        src="http://widget.weibo.com/weiboshow/index.php?width=0&height=550&ptype=1&speed=0&skin=&isTitle=0&noborder=1&isWeibo=1&isFans=&uid=2552329061&verifier=80884619">
      </iframe>
    </li>
  </ul>
</section>

最后就是在_config.yml中配置了

1
2
3
4
5
6
7
8
9
 #weibo
 #http://weibo.com/tool/weiboshow to get your uid and verifier
weibo_uid: #你自己的微博id(在生成的代码中可以看见)
weibo_verifier: #你自己的verifier
weibo_fansline: 0   # How many lines for the fan list
weibo_show: true    # Whether you want your weibo content to be shown
weibo_pic: true     # Whether you want the pictures in weibo to be shown
weibo_skin: 10      # Please refer to http://weibo.com/tool/weiboshow
weibo_share: true   # Whether show the sharing button