From 618c58b263d98b006cfc083265fd11576dab7824 Mon Sep 17 00:00:00 2001 From: Klaus Laube Date: Wed, 5 Apr 2023 22:23:28 +0200 Subject: [PATCH] Fix the summary issue of not cutting the text --- README.md | 1 + templates/includes/article.html | 5 ++++- templates/macros/summary.html | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 templates/macros/summary.html diff --git a/README.md b/README.md index 2ad00f5..ecbf9b9 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ This theme uses the following Pelican plugins: - Installed [through forking](https://github.com/getpelican/pelican-plugins/tree/master#how-to-use-plugins) `pelican-plugins` repository: - [i18n_subsites](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites) `(required)` - [summary](https://github.com/getpelican/pelican-plugins/tree/master/summary) `(recommended)` + - [representative_image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) `(recommended)` - Installed through manual intervention: - [extended_meta](https://github.com/kplaube/extended_meta) `(optional)` diff --git a/templates/includes/article.html b/templates/includes/article.html index c211a2a..e1ce447 100644 --- a/templates/includes/article.html +++ b/templates/includes/article.html @@ -1,3 +1,5 @@ +{% import 'macros/summary.html' as summ %} +
{% if article.meta %}
@@ -47,7 +49,8 @@

{% endif %} - {{ article.summary }} + {{ summ.format(article) }} +