chore: Re-organized posts

This commit is contained in:
2025-08-20 21:55:44 -04:00
parent 2d0134a51b
commit a2576e1cfd
4 changed files with 30 additions and 4 deletions

View File

@ -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>