mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
hugolib: Add missing zero check on file
This commit is contained in:
@@ -728,8 +728,10 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
var id string
|
var id string
|
||||||
|
var filename string
|
||||||
if !p.f.IsZero() {
|
if !p.f.IsZero() {
|
||||||
id = p.f.UniqueID()
|
id = p.f.UniqueID()
|
||||||
|
filename = p.f.Filename()
|
||||||
}
|
}
|
||||||
|
|
||||||
cpp, err := cp.New(
|
cpp, err := cp.New(
|
||||||
@@ -737,7 +739,7 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo
|
|||||||
Document: newPageForRenderHook(ps),
|
Document: newPageForRenderHook(ps),
|
||||||
DocumentID: id,
|
DocumentID: id,
|
||||||
DocumentName: p.Path(),
|
DocumentName: p.Path(),
|
||||||
Filename: p.f.Filename(),
|
Filename: filename,
|
||||||
ConfigOverrides: renderingConfigOverrides,
|
ConfigOverrides: renderingConfigOverrides,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user