2016-12-02 56 views
0

據jekyll分頁不工作與永久鏈接我讓我的根索引頁面顯示blog posts像博客頁面, 我的網站有一個博客/ questions/news/media - posts categories使用jekyll分頁顯示自定義類別

所以之前我使用分頁這是相當不錯的,我能夠與

{% for posts in site.categories['blog'] %} 

在/blog.html顯示在指定的地方規定的職位只/博客顯示blog posts /與課程

的永久鏈接

現在我blog.html的代碼移動到index.html頁面, 和分頁工作正常,但顯示的所有帖子blogmedianews

所以有任何幫助嗎?或者我可以使用一些技巧在多頁中創建/不分頁的博客文章?

在此先感謝。

回答

0

我也嘗試用jekyll-paginate來構建我的頁面,但由於插件不再處於活動狀態,我切換到octopress-paginate

這允許我們使用一個簡單的語法,如:

{% for post in paginator.posts %} 

或任何其他集合/你的頁面類型。

+0

謝謝你,你非常幫我 –