Re-add a page for each post tag

This commit is contained in:
Oliver Davies 2021-07-09 12:00:00 +01:00
parent 7c99281ae2
commit e36882ee20
4 changed files with 34 additions and 11 deletions

View file

@ -8,7 +8,11 @@
<div class="max-w-2xl px-4 py-10 mx-auto md:py-16">
<div id="main-content">
<h1 class="text-xl font-bold md:text-2xl">{{ page.title }}</h1>
<h1 class="text-xl font-bold md:text-2xl">
{% block page_title %}
{{ page.title }}
{% endblock %}
</h1>
<div class="mt-4">
{% block content_wrapper %}

View file

@ -8,16 +8,8 @@ intro_text: |
<div class="mt-10">
<div class="space-y-8">
{% for talk in data.posts|sort((a, b) => a.date < b.date) %}
<article>
<h2>
<a class="text-blue-800 dark:text-blue-400" href="{{ talk.url }}">
{{ talk.title }}
</a>
</h2>
<p class="mt-1">{{ talk.excerpt }}</p>
</article>
{% for post in data.posts|sort((a, b) => a.date < b.date) %}
{% include 'post/post-teaser' with { post } only %}
{% endfor %}
</div>
</div>

View file

@ -0,0 +1,9 @@
<article>
<h2>
<a class="text-blue-800 dark:text-blue-400" href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<p class="mt-1">{{ post.excerpt }}</p>
</article>

18
source/blog/tags/tag.html Normal file
View file

@ -0,0 +1,18 @@
---
title: Tag Archive
layout: page
generator:
- posts_tag_index
---
{% block page_title %}
{{ page.title }}: {{ page.tag }}
{% endblock %}
{% block content %}
<div class="space-y-8">
{% for post in page.tag_posts %}
{% include 'post/post-teaser' with { post } only %}
{% endfor %}
</div>
{% endblock %}