From 910c22d071e0f2c0748f172b7318147e8a45201f Mon Sep 17 00:00:00 2001 From: Blaise Thompson Date: Sat, 23 Jan 2021 17:55:19 -0600 Subject: tags --- templates/index.html | 6 ++++-- templates/tags.html | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 templates/tags.html (limited to 'templates') diff --git a/templates/index.html b/templates/index.html index 7a74e3c..554d418 100644 --- a/templates/index.html +++ b/templates/index.html @@ -9,16 +9,18 @@

Welcome to my personal blog!
This page lists my blog entries in reverse chronological order.
-You may also browse by tag (coming soon).
+You may also browse by tag.
You may be interested in my meta post.
Thanks for stopping by! —Blaise

-

{% for post in posts %} {{ post.date }} {{ post.title }} + {% for tag in post.tags %} + #{{ tag }} + {% endfor %}
{% endfor %}

diff --git a/templates/tags.html b/templates/tags.html new file mode 100644 index 0000000..e788ce5 --- /dev/null +++ b/templates/tags.html @@ -0,0 +1,30 @@ +{% include "header.html" %} + +

+blaise-blog/tags +

+ +
+ +{% for tag in tags %} + +

{{ tag }}

+ +

+{% for post in posts %} + {% if tag in post.tags %} + {{ post.date }} + {{ post.title }} + {% for tag_ in post.tags %} + {% if tag_ != tag %} + #{{ tag_ }} + {% endif %} + {% endfor %} +
+ {% endif %} +{% endfor %} +

+ +{% endfor %} + +{% include "footer.html" %} -- cgit v1.2.3