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
|
layout: layout.liquid
|
||||||
title: Posts
|
title: Posts
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% for post in collections.post %}
|
<h1>All Posts</h1>
|
||||||
<h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2>
|
</div>
|
||||||
<p>{{ post.content }}</p>
|
<div class="container">
|
||||||
{% endfor %}
|
<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>
|
</div>
|
||||||
Reference in New Issue
Block a user