diff --git a/pelican/contents.py b/pelican/contents.py index f5f3a1dc..b8bb0993 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -139,7 +139,9 @@ class Page(object): if hasattr(self, '_summary'): return self._summary else: - return truncate_html_words(self.content, 50) + if self.settings['SUMMARY_MAX_LENGTH']: + return truncate_html_words(self.content, self.settings['SUMMARY_MAX_LENGTH']) + return self.content def _set_summary(self, summary): """Dummy function""" diff --git a/pelican/settings.py b/pelican/settings.py index 4da66989..a8c8bea4 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -68,6 +68,7 @@ _DEFAULT_CONFIG = {'PATH': '.', 'ARTICLE_PERMALINK_STRUCTURE': '', 'TYPOGRIFY': False, 'LESS_GENERATOR': False, + 'SUMARY_MAX_LENGTH': 50, }