From a4e35942fee745e64db5d0099ba2582e0fb4417e Mon Sep 17 00:00:00 2001
From: Dennis Fink
Date: Thu, 18 Jun 2026 17:57:51 +0200
Subject: Build the first usable version of the blog
This adds the Lektor project structure, models, templates, styling,
feeds, categories, tags, archives, custom Markdown heading handling, and
the initial content needed to make the blog usable.
---
templates/macros/blog.html | 100 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
create mode 100644 templates/macros/blog.html
(limited to 'templates/macros/blog.html')
diff --git a/templates/macros/blog.html b/templates/macros/blog.html
new file mode 100644
index 0000000..b4caafe
--- /dev/null
+++ b/templates/macros/blog.html
@@ -0,0 +1,100 @@
+{% from "macros/pagination.html" import render_pagination %}
+
+{% macro render_toc(toc, maxdepth=2) %}
+
+{% endmacro %}
+
+{% macro render_blog_post(post, show_toc=True) %}
+
+
+
+
+
+ {% if post.publication_date %}
+
+ {% else %}
+
+
- ⚠
+ -
+ Missing publication date
+
+
+ {% endif %}
+ {% if post.updated_date and post.publication_date and (post.updated_date > post.publication_date) %}
+
+
- Last updated:
+ -
+
+
+
+ {% endif %}
+ {% if post.category %}
+
+
- Category:
+
-
+ {% set category = site.get('/categories/'+post.category) %}
+ {{ category.name }}
+
+
+ {% endif %}
+
+
+ {% if show_toc and post.render_toc %}
+ {% set toc = post.body.toc|default([]) %}
+ {{ render_toc(toc) }}
+ {% endif %}
+
+ {{ post.body }}
+ {% if post.tags %}
+
+ {% endif %}
+
+{% endmacro %}
+
+{% macro render_blog_index(pagination) %}
+ {% for post in pagination.items %}
+ {{ render_blog_post(post, False) }}
+ {% if not loop.last %}
+
+ {% endif %}
+ {% endfor %}
+ {% if pagination.pages > 1 %}
+
+ {% endif %}
+{% endmacro %}
--
cgit v1.3.1