Octopressのサイドバーのカスタマイズは下記サイトに分かりやすく紹介されていた。

Ruby – Octopressでサイドバーに簡易プロフィールを表示させよう! – Qiita
http://qiita.com/fakestarbaby/items/ac729ec076f477f05ac6

初めからアバウトページがsource/_includes/custom/asides内にabout.htmlとして用意されているので、これを編集する。
サイドバーに表示させるには、Octopressメインフォルダ下_config.yml内の「Jekyll & Plugins 」の項のdefault_asidesの欄に下記のように/source以下のパスとしてcustom/asides/about.htmlを追加すればよいらしい。(私は一番後尾に追加)

default_asides: [asides/recent_posts.html, asides/github.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html, custom/asides/about.html]

サイドバーに自作の項目「hogehoge」を追加する時は同様に、source/_includes/custom/asides 内にabout.htmlの要領でhogehoge.htmlを作り内容を編集

<section>
  <h1>hogehoge</h1>
  <p>ほげほげ</p>
</section>

_config.ymlのdefault_asides欄にcustom/asides/hogehoge.htmlを追加すればちゃんと表示された。

表示   このエントリーをはてなブックマークに追加

Comments

2014年4月4日