aboutsummaryrefslogtreecommitdiff
path: root/templates/index.html
diff options
context:
space:
mode:
authorJieiku2022-05-30 22:43:55 -0700
committerJieiku2022-05-30 22:43:55 -0700
commita04e54d9fed5760e6843b74d20e8df63b8d890c6 (patch)
treeb00df20425e63bce72531b606a13b4ac4b401d12 /templates/index.html
parent8f70a54e8bba3e29bedea4d3cfcbca1d5b123dd1 (diff)
downloadabridge-a04e54d9fed5760e6843b74d20e8df63b8d890c6.tar.gz
abridge-a04e54d9fed5760e6843b74d20e8df63b8d890c6.tar.bz2
abridge-a04e54d9fed5760e6843b74d20e8df63b8d890c6.zip
Add Page.summary fallback and Add Katex
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html12
1 files changed, 11 insertions, 1 deletions
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 %}
<article>
{{ macros::title(page=page) }}
- <p>{{ page.summary | markdown(inline=true) | safe }} <a href="{{ page.permalink | safe }}">...more</a></p>
+ <p>
+ {% 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 -%}
+ <a href="{{ page.permalink | safe }}">...more</a>
+ </p>
</article>
{% endfor %}
<nav>