Octopressのトップページにいくつかのブログ記事が表示されることを期待してるんだけど表示されずに フッターの"Blog Archives"のみとなってしまう。

一番最初に確認するところはpaginationが有効になっているかどうかだと思うんだけど ここはちゃんと設定しているように見える。基本的にはブログ名とかを変えただけだし…

http://jekyllrb.com/docs/pagination/

_config.yml

1
2
3
4
5
6
paginate: 5          # Posts per page on the blog index
paginate_path: "posts/:num"  # Directory base for pagination URLs eg. /posts/2/
recent_posts: 5       # Posts in the sidebar Recent Posts section
excerpt_link: "more.."  # "Continue reading" link text at the bottom of excerpted articles
excerpt_separator: "<!--more-->"
...

でまあ、実際に出力されたHTMLを見る限りは

public/index.html

1
2
3
4
5
6
<div id="content" class="inner">
<nav id="pagenavi">
    <div class="center"><a href="/archives">Blog Archives</a></div>
</nav>
</div>
...

こんな感じになってて記事本文は出力されてない模様。

それじゃあ、ということでテンプレート側のファイルを見てみると

source/index.html

1
2
3
4
5
6
7
 assign index = true
 for post in paginator.posts
 assign content = post.content
    <article class="post"> include article.html </article>
 endfor
<nav id="pagenavi">
...

文法とかはよくわからないんだけど({%%})は評価されてしまうので取り除いた)、paginator.postsのforが回ってない感じがする、 といったところまで調べてひとまず終わり。未解決!

Comments