mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
@@ -290,10 +290,11 @@ func (p *Page) initContent() {
|
||||
defer cancel()
|
||||
c := make(chan error, 1)
|
||||
|
||||
p.contentInitMu.Lock()
|
||||
defer p.contentInitMu.Unlock()
|
||||
|
||||
go func() {
|
||||
var err error
|
||||
p.contentInitMu.Lock()
|
||||
defer p.contentInitMu.Unlock()
|
||||
|
||||
err = p.prepareForRender()
|
||||
if err != nil {
|
||||
@@ -301,6 +302,12 @@ func (p *Page) initContent() {
|
||||
return
|
||||
}
|
||||
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
}
|
||||
|
||||
if len(p.summary) == 0 {
|
||||
if err = p.setAutoSummary(); err != nil {
|
||||
err = p.errorf(err, "failed to set auto summary")
|
||||
|
Reference in New Issue
Block a user