mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Prevent WARNINGs in RenderString
This commit is contained in:
@@ -727,11 +727,16 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo
|
|||||||
return converter.NopConverter, errors.Errorf("no content renderer found for markup %q", p.markup)
|
return converter.NopConverter, errors.Errorf("no content renderer found for markup %q", p.markup)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var id string
|
||||||
|
if !p.f.IsZero() {
|
||||||
|
id = p.f.UniqueID()
|
||||||
|
}
|
||||||
|
|
||||||
cpp, err := cp.New(
|
cpp, err := cp.New(
|
||||||
converter.DocumentContext{
|
converter.DocumentContext{
|
||||||
Document: newPageForRenderHook(ps),
|
Document: newPageForRenderHook(ps),
|
||||||
DocumentID: p.f.UniqueID(),
|
DocumentID: id,
|
||||||
DocumentName: p.f.Path(),
|
DocumentName: p.Path(),
|
||||||
ConfigOverrides: renderingConfigOverrides,
|
ConfigOverrides: renderingConfigOverrides,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user