안녕하십니까. github, jekyll 및 ruby에 익숙하지 않습니다. 아마도이 질문에 이미 답변되어 있지만 초보자가되어서 문제를 해결하기가 어렵습니다.지킬 한 페이지의 다중 페이지 매기기
하나의 페이지에 여러 페이지를 넣으려고합니다. 즉, 블로그에 내용을 게시하는 두 명의 작성자가 있습니다. 그래서 나는 각각에 대한 부서를 만들고 각각에 대해 페이지 매김을 원합니다. 현재 코드 이 같은 것입니다 :
또한<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% for post in paginator.posts %}
{% if post.author contains "NAME OF AUTHOR 1" %}
<div class="post-preview">
<a href="{{ post.url }}">
<h2 class="post-title">
{{ post.title }}
</h2>
<h3 class="post-subtitle">
{{ post.description }}
</h3>
</a>
<p class="post-meta">Posted by <a href="#">{{ post.author }}</a> {{ post.date | date_to_string }}</p>
</div>
<hr>
{% endif %}
{% endfor %}
<!-- Pager -->
{% if paginator.total_pages > 1 %}
<ul class="pager">
{% if paginator.previous_page %}
<li class="previous">
<a href="{{ paginator.previous_page_path | prepend: site.url | replace: '//', '/' }}">← Newer Posts</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li class="next">
<a href="{{ paginator.next_page_path | prepend: site.url | replace: '//', '/' }}">Older Posts →</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
{% for post in paginator.posts %}
{% if post.author contains "NAME OF AUTHOR2" %}
<div class="post-preview">
<a href="{{ post.url | prepend: site.url }}">
<h2 class="post-title">
{{ post.title }}
</h2>
<h3 class="post-subtitle">
{{ post.description }}
</h3>
</a>
<p class="post-meta">Posted by <a href="#">{{ post.author }}</a> {{ post.date | date_to_string }}</p>
</div>
<hr>
{% endif %}
{% endfor %}
<!-- Pager -->
{% if paginator.total_pages > 1 %}
<ul class="pager">
{% if paginator.previous_page %}
<li class="previous">
<a href="{{ paginator.previous_page_path | prepend: site.url | replace: '//', '/' }}">← Newer Posts</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li class="next">
<a href="{{ paginator.next_page_path | prepend: site.url | replace: '//', '/' }}">Older Posts →</a>
</li>
{% endif %}
</ul>
{% endif %}
</div>
_config.yml의 PAGINATE에서 부트 스트랩과 내가 사용한 3
지킬으로 설정됩니다 (만약 정확하지-부트 스트랩을 지킬 오전), 그리고 아주 간단 튜토리얼을 따라도 파일 구조도 매우 간단합니다.
도움을 주셔서 감사합니다. 많은 사람들에게 감사의 말을 전하기 전에 많은 문서와 게시물을 읽었습니다.
또한, 블로그는 또한 REPO 현재 위의 코드에 따라 최선을 다하고되지 https://github.com/neortls007idev/Blog
에 http://neorblog.in와 GitHub의 저장소에 호스팅됩니다.
내가 gick에 총 도움을 청할 수있는 지킬에 대해서만 같은 일을 사용하여 – NeoR
또한 나는 그 github 페이지를 읽고 jekyll 플러그인을 지원하지 않습니다 – NeoR
내 대답을 편집했습니다. –