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하고
_examplecol
폴더에 3 개 이상의 파일이 있으면이 내가 얻을,
# 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
지금은 내 config.yml에 추가 된 것입니다 내 머리글에 example.md의 인스턴스가 1 개 이상 있습니다.
페이징 된 페이지를 모두 포함하는 머리글에 Example Collection 인스턴스를 하나만 만들려면 어떻게해야합니까? 나는 바보 같은 것을 놓치고 있다고 생각한다.
example.md YAML에서 퍼머 링크 항목을 삭제하려고 시도했지만 jekyll 프로세서가 examplecol/index.html을 찾을 수 없도록 만들었습니다.