我已經經歷了關於Jekyll和分頁的以前的問題,沒有任何建議工作。我有這樣的:無法使用分頁工作在Jekyll中/檔案/目錄
_config.yml
gems:
- jekyll-paginate
paginate: 5 # amount of posts to show
paginate_path: archive/page:num/
archive.html
---
layout: archive
permalink: /archive/
author_profile: true
---
{% include base_path %}
<h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3>
{% for post in paginator.posts %}
{% include archive-single.html %}
{% endfor %}
{% include paginator.html %}
這與/存檔是個非常好的格式存檔頁/零個帖子結束。我的帖子確實有永久鏈接,我不知道這是否是問題。子目錄正在正確創建,但歸檔頁面沒有找到它們。
請注意,如果我把它放在index.html中,效果很好,但我希望在前面有一個啓動頁面,並有一個鏈接到文章的存檔頁面,這似乎是可行的,但不起作用。
請不要稱這爲重複。我已經閱讀過其他10篇文章,並且出於某種原因,它只是不起作用。
這是哲基爾3.1.6
我建議你只建立少量帖子的網站,並從這些帖子中刪除永久鏈接。他們在文檔中明確指出,永久鏈接打破了分頁 - https://jekyllrb.com/docs/pagination/ –
我從所有文章中刪除了固定鏈接,並且仍然有相同的結果。 –
你有GitHub上的代碼嗎?如果沒有,你可以在初學者網站(jekyll new sitename)上覆制相同的行爲,並在GitHub上發佈代碼? –