Compare commits

...

2 commits

Author SHA1 Message Date
curegit 6ababaa832
Merge 79512c9fd8 into 54a8f0ce21 2024-03-27 11:22:09 +01:00
curegit 79512c9fd8 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.
2024-03-25 11:09:20 +09:00

View file

@ -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 != "" {