mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Introduce SUMMARY_MAX_PARAGRAPHS
Let the users use only the n-first paragraphs of the article as article summary. The advantage of this approach is that we avoid the random word count ellipsis that will cut content in pieces, while not having to copy the first paragraph of the article into the article's summary metadata. If both SUMMARY_MAX_PARAGRAPHS and SUMMARY_MAX_LENGTH are set, then the SUMMARY_MAX_LENGTH option will apply to the number of paragraphs in SUMMARY_MAX_PARAGRAPHS.
This commit is contained in:
parent
7194cf5795
commit
fd029b2bc9
7 changed files with 83 additions and 2 deletions
|
|
@ -308,6 +308,14 @@ Basic settings
|
|||
does not otherwise specify a summary. Setting to ``None`` will cause the
|
||||
summary to be a copy of the original content.
|
||||
|
||||
.. data:: SUMMARY_MAX_PARAGRAPHS = None
|
||||
|
||||
When creating a short summary of an article, this will be the number of
|
||||
paragraphs to use as the summary. This only applies if your content
|
||||
does not otherwise specify a summary. Setting to ``None`` will cause the
|
||||
summary to use the whole text (up to ``SUMMARY_MAX_LENGTH``) instead of just
|
||||
the first N paragraphs.
|
||||
|
||||
.. data:: SUMMARY_END_SUFFIX = '…'
|
||||
|
||||
When creating a short summary of an article and the result was truncated to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue