chore: Re-organized posts
This commit is contained in:
@ -1,11 +1,37 @@
|
||||
---
|
||||
pagination:
|
||||
data: collections.posts
|
||||
size: 10
|
||||
alias: post
|
||||
reverse: true
|
||||
permalink: "/posts{% if pagination.pageNumber != 0 %}/{{ pagination.pageNumber }}{% endif %}/"
|
||||
layout: layout.liquid
|
||||
title: Posts
|
||||
---
|
||||
|
||||
<div class="container">
|
||||
{% for post in collections.post %}
|
||||
<h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2>
|
||||
<p>{{ post.content }}</p>
|
||||
{% endfor %}
|
||||
<h1>All Posts</h1>
|
||||
</div>
|
||||
<div class="container">
|
||||
<ul>
|
||||
{% for post in pagination.items %}
|
||||
<li>
|
||||
<a href="{{ post.url }}">{{ post.data.title }}</a> – {{ post.date | date: "%B %-d, %Y" }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="pagination">
|
||||
{% if pagination.href.previous %}
|
||||
<a href="{{ pagination.href.previous }}">← Previous</a>
|
||||
{% endif %}
|
||||
|
||||
Page {{ pagination.pageNumber | plus: 1 }} of {{ pagination.pages | size }}
|
||||
|
||||
{% if pagination.href.next %}
|
||||
<a href="{{ pagination.href.next }}">Next →</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user