From c2eb9bb3f45091d1473fc6df45dba9b3cfcc83af Mon Sep 17 00:00:00 2001 From: Lol3rrr Date: Wed, 20 May 2026 20:49:25 +0200 Subject: [PATCH] Overwrite macro to include indication for drafts --- templates/macros/post_macros.html | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 templates/macros/post_macros.html diff --git a/templates/macros/post_macros.html b/templates/macros/post_macros.html new file mode 100644 index 0000000..bab6bc4 --- /dev/null +++ b/templates/macros/post_macros.html @@ -0,0 +1,40 @@ +{% macro meta(page) %} + + + + + {{ page.reading_time }} minute read + + + + + {% if page.date %}Published: {{ page.date | date(format="%F") }}{% endif %} +{% endmacro meta %} + +{% macro page_in_list(page) %} +
+
+

+ + {% if page.draft %}[Draft]{%endif%} + {{ page.title | safe }} + +

+ {{ self::meta(page=page) }} +
+ {% if page.description or page.summary %} +
+ {% if page.description %} + {{ page.description | safe }} + {% else %} + {{ page.summary | safe }} + {% endif %} + +
+ {% endif %} +
+{% endmacro page_in_list %}