feat: created basic blog layout

This commit is contained in:
Leyla Becker 2026-02-10 11:02:43 -06:00
parent 42fd071301
commit 0d41db36ef
13 changed files with 935 additions and 3 deletions

30
_includes/post.njk Normal file
View file

@ -0,0 +1,30 @@
---
layout: base.njk
---
<article class="blog-post">
<header class="post-header">
<h1>{{ title }}</h1>
<time datetime="{{ createdAt | dateFormat }}">{{ createdAt | dateFormat }}</time>
{% if updatedAt %}
<p class="updated-at">Updated: <time datetime="{{ updatedAt | dateFormat }}">{{ updatedAt | dateFormat }}</time></p>
{% endif %}
</header>
<div class="post-content">
{{ content | safe }}
</div>
{% set postTags = page.inputPath | extractTagsFromFile %}
{% if postTags.length > 0 %}
<section class="post-tags">
<h2>Tags</h2>
<ul class="tag-list">
{% for tag in postTags %}
<li><a href="/tags/{{ tag | lower }}/">#{{ tag }}</a></li>
{% endfor %}
</ul>
</section>
{% endif %}
</article>