From e412657581c060a117f178d1224a4bce53bbae26 Mon Sep 17 00:00:00 2001 From: "(GalaxyMaster)" Date: Sat, 11 Apr 2020 15:35:26 +1000 Subject: [PATCH] Added support for the summary end marker configuration --- pelican/contents.py | 3 ++- pelican/settings.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pelican/contents.py b/pelican/contents.py index 594cd3b5..620fa304 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -390,7 +390,8 @@ class Content(object): return self.content return truncate_html_words(self.content, - self.settings['SUMMARY_MAX_LENGTH']) + self.settings['SUMMARY_MAX_LENGTH'], + self.settings['SUMMARY_END_MARKER']) @property def summary(self): diff --git a/pelican/settings.py b/pelican/settings.py index 0cdcefc7..7d80ba90 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -136,6 +136,7 @@ DEFAULT_CONFIG = { 'ARTICLE_PERMALINK_STRUCTURE': '', 'TYPOGRIFY': False, 'TYPOGRIFY_IGNORE_TAGS': [], + 'SUMMARY_END_MARKER': '…', 'SUMMARY_MAX_LENGTH': 50, 'PLUGIN_PATHS': [], 'PLUGINS': None,