From 7e5840e15ae2e72e87e60d8b0f5858ea9a02dad3 Mon Sep 17 00:00:00 2001 From: maia arson crimew Date: Tue, 31 May 2022 21:28:57 +0200 Subject: [PATCH] add index pages for blog post tags --- src/_includes/layouts/post.njk | 2 +- src/static/style.css | 9 ++++++--- src/tagged.njk | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 src/tagged.njk diff --git a/src/_includes/layouts/post.njk b/src/_includes/layouts/post.njk index d67b40e..cba7f9d 100644 --- a/src/_includes/layouts/post.njk +++ b/src/_includes/layouts/post.njk @@ -14,7 +14,7 @@ subhead: blog {% if tags %} in {% for tag in tags %} - {{ tag }}{% if not loop.last %}, {% endif %} + {{ tag }}{% if not loop.last %}, {% endif %} {% endfor %} {% endif %} diff --git a/src/static/style.css b/src/static/style.css index c06c286..141b7f4 100644 --- a/src/static/style.css +++ b/src/static/style.css @@ -40,16 +40,19 @@ footer, font-size: 0.75rem; } -time, .author { +time, +.author { font-weight: bold; } -.article_header { +.article_header, +.page_header { padding-bottom: 4px; border-bottom: 1px dotted rgb(219, 103, 167); } -.article_header > h1 { +.article_header > h1, +.page_header > h1 { margin: 0.1rem; } diff --git a/src/tagged.njk b/src/tagged.njk new file mode 100644 index 0000000..446c2d1 --- /dev/null +++ b/src/tagged.njk @@ -0,0 +1,27 @@ +--- +eleventyComputed: + title: posts tagged "{{ tag }}" +subhead: blog +pagination: + data: collections + size: 1 + alias: tag + filter: + - posts + addAllPagesToCollections: true +permalink: /posts/tagged/{{ tag }}/index.html +--- +{% extends 'layouts/default.njk' %} +{% block main %} + + +{% endblock %}