leilukin-site/src/pages/blog.njk

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-04-15 17:39:56 +00:00
---
layout: main/content
title: Blog
2024-04-16 07:47:30 +00:00
desc: Blog hosted on Leilukin's personal website.
2024-04-15 17:39:56 +00:00
tags: blog pages
2024-04-16 09:39:34 +00:00
date: 2023-01-04
2024-04-16 07:47:30 +00:00
pageTitle: Welcome to Leilukin's Hub Blog!
2024-04-16 09:09:38 +00:00
blogNav: Blog Home
2024-04-16 08:56:15 +00:00
pagination:
data: collections.posts
size: 5
alias: postList
reverse: true
permalink: "/{{ page.fileSlug }}{% if pagination.pageNumber > 0 %}/page/{{ pagination.pageNumber + 1 }}{% endif %}/"
---
<ul class="blog__postlist">
{% for post in postList %}
<li>
<h2 class="blog__title">
<a href="{{ post.url }}">
{% if post.data.title %}{{ post.data.articleTitle }}
{% else %}
<code>{{ post.url }}</code>
{% endif %}
</a>
</h2>
<time>{{ post.date | niceDate }}</time>
<p>{{ post.data.desc }}</p>
</li>
{% endfor %}
</ul>
<p class="center-text">
{% if pagination.href.previous %}
<a href=" {{ pagination.href.previous }}">Newer</a>
2024-04-16 08:56:15 +00:00
{% else %}
Newer
2024-04-16 08:56:15 +00:00
{% endif %}
/
{% if pagination.href.next %}
<a href=" {{ pagination.href.next }}">Older</a>
2024-04-16 08:56:15 +00:00
{% else %}
Older
2024-04-16 08:56:15 +00:00
{% endif %}
</p>