私はpaginate v2をインストールしてコレクションをページ付けする方法に従っていましたが、paginatorによって作成されたすべてのページのトップレベルページリンクを追加しました。ここでjekyll paginate v2を使用してコレクションと重複するページを避けるにはどうすればよいですか?
は
---
layout: page
title: Example Collection
permalink: /example/
pagination:
enabled: true
---
{% for post in paginator.posts %}
<h1>{{ post.title }}</h1>
{% endfor %}
{% if paginator.total_pages > 1 %}
<ul>
{% if paginator.previous_page %}
<li>
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li>
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older</a>
</li>
{% endif %}
</ul>
{% endif %}
をexample.mdそして、これは3つの以上のファイルが_examplecol
フォルダ内に存在する場合、私が得る、私は私のconfig.yml今
# Collections
collections:
examplecol:
output: true
permalink: /:collection/:path/
# Plugin: Pagination (jekyll-paginate-v2)
pagination:
collection : 'examplecol'
enabled : true
debug : false
per_page : 3
#permalink : "/page/:num/"
title : ":title - Page :num of :max"
limit : 0
sort_field : "date"
sort_reverse : true
に追加するものです私のヘッダーのページとしてexample.mdの1つ以上のインスタンス。
にはどうすればページ分割ページのすべてを保持しているヘッダー内の例コレクションの1つのインスタンスのみを持つことができますか?私は何か愚かなことを逃していると思う。
私はexample.md YAMLでパーマリンクのエントリを削除しようとしたが、ジキルプロセッサはexamplecol/index.htmlのを見つけることができなかったように、それはちょうどそれを作りました。