implemented blog posts
This commit is contained in:
22
src/blog.njk
Normal file
22
src/blog.njk
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: "Blog"
|
||||
layout: "layout.njk"
|
||||
---
|
||||
|
||||
<h1 class="text-4xl font-bold text-white mb-8 section-title">All Posts</h1>
|
||||
|
||||
<div class="space-y-8">
|
||||
{%- for post in collections.posts | reverse -%}
|
||||
<div class="card">
|
||||
<h2 class="text-2xl font-bold mb-2">
|
||||
<a href="{{ post.url }}" class="text-blue-400 hover:underline">{{ post.data.title }}</a>
|
||||
</h2>
|
||||
<p class="text-gray-400 mb-4">
|
||||
{{ post.date | readableDate }}
|
||||
</p>
|
||||
{% if post.data.excerpt %}
|
||||
<p class="text-gray-300">{{ post.data.excerpt }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
Reference in New Issue
Block a user