From 79512c9fd80c02399a39a9088b22d8b0ce0a0d65 Mon Sep 17 00:00:00 2001 From: curegit <37978051+curegit@users.noreply.github.com> Date: Thu, 14 Mar 2024 19:01:44 +0900 Subject: [PATCH] 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 `` summary divider. --- hugolib/page__content.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugolib/page__content.go b/hugolib/page__content.go index 62e78c612..54f7be961 100644 --- a/hugolib/page__content.go +++ b/hugolib/page__content.go @@ -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 != "" {