diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 12 | ||||
| -rw-r--r-- | templates/index.html | 12 |
2 files changed, 21 insertions, 3 deletions
diff --git a/templates/base.html b/templates/base.html index 18e1fb4..d148811 100644 --- a/templates/base.html +++ b/templates/base.html @@ -127,10 +127,18 @@ {% endif %} {% if config.build_search_index %} - <script type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false, cachebust=true) | safe }}" defer></script> - <script type="text/javascript" src="{{ get_url(path="search.min.js", trailing_slash=false, cachebust=true) | safe }}" defer></script> + <script defer type="text/javascript" src="{{ get_url(path="search_index.en.js", trailing_slash=false, cachebust=true) | safe }}"></script> + <script defer type="text/javascript" src="{{ get_url(path="search.min.js", trailing_slash=false, cachebust=true) | safe }}"></script> {% endif %} + {% if config.extra.katex_enabled %} + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous"> + <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script> + <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/mathtex-script-type.min.js" integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT" crossorigin="anonymous"></script> + {% if config.extra.katex_auto_render %} + <script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"></script> + {% endif %} + {% endif %} {% block extra_head %}{% endblock extra_head %} </head> <body> 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> |
