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 %}