From 06fd9be1c22f3b5f70568389c206afdb9ad1f348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles=20Fl=C3=A8che?= Date: Fri, 9 Feb 2018 10:40:47 +0100 Subject: [PATCH] Get Content._summary from metadata --- pelican/contents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/contents.py b/pelican/contents.py index 852bb49d..d8881fe9 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -337,8 +337,8 @@ class Content(object): This is based on the summary metadata if set, otherwise truncate the content. """ - if hasattr(self, '_summary'): - return self._update_content(self._summary, siteurl) + if 'summary' in self.metadata: + return self.metadata['summary'] if self.settings['SUMMARY_MAX_LENGTH'] is None: return self.content