mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-12 04:24:13 +00:00
hugolib: Fix regression in summary generation behavior since v0.123
Fix regression in content summarization so that we can use empty summary by using the manual summary divider. Since v0.123, there has been the regression that causes Hugo to use automatic summary generation when the manual summary results in an empty string, even if there is a `<!--more-->` summary divider.
This commit is contained in:
parent
27414d43a0
commit
79512c9fd8
|
@ -770,7 +770,7 @@ func (c *cachedContent) contentPlain(ctx context.Context, cp *pageContentOutput)
|
|||
result.readingTime = (result.wordCount + 212) / 213
|
||||
}
|
||||
|
||||
if rendered.summary != "" {
|
||||
if c.pi.hasSummaryDivider || rendered.summary != "" {
|
||||
result.summary = rendered.summary
|
||||
result.summaryTruncated = rendered.summaryTruncated
|
||||
} else if cp.po.p.m.pageConfig.Summary != "" {
|
||||
|
|
Loading…
Reference in a new issue