mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
Add context to asciidoc/-tor error logging
Add DocumentName (path to the file being rendered) to RenderingContext and use that information to include the path in the error print. See #2399 Closes #2567
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
9f9b93af2c
commit
766c82a6bb
@@ -243,7 +243,9 @@ func renderShortcode(sc shortcode, parent *ShortcodeWithPage, p *Page, t tpl.Tem
|
||||
newInner := helpers.RenderBytes(&helpers.RenderingContext{
|
||||
Content: []byte(inner), PageFmt: p.determineMarkupType(),
|
||||
ConfigProvider: p.Language(),
|
||||
DocumentID: p.UniqueID(), Config: p.getRenderingConfig()})
|
||||
DocumentID: p.UniqueID(),
|
||||
DocumentName: p.Path(),
|
||||
Config: p.getRenderingConfig()})
|
||||
|
||||
// If the type is “unknown” or “markdown”, we assume the markdown
|
||||
// generation has been performed. Given the input: `a line`, markdown
|
||||
|
Reference in New Issue
Block a user