From a04e54d9fed5760e6843b74d20e8df63b8d890c6 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 30 May 2022 22:43:55 -0700 Subject: Add Page.summary fallback and Add Katex --- templates/index.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'templates/index.html') diff --git a/templates/index.html b/templates/index.html index 79e187a..f0740fe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,7 +6,17 @@ {% for page in paginator.pages %}
{{ macros::title(page=page) }} -

{{ page.summary | markdown(inline=true) | safe }} ...more

+

+ {% if page.summary -%} + {{ page.summary | markdown(inline=true) | safe }} + {% elif page.description %} + {{ page.description | safe }} + {% elif page.content %} + {{ page.content | safe | striptags | truncate(length=150) }} + {% elif page.extra.static_thumbnail %} + {% endif -%} + ...more +

{% endfor %}