diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-06-26 13:27:01 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-06-26 13:27:01 +0200 |
commit | ccfaeb678b312535928af3451324a54f2c7cb199 (patch) | |
tree | c67ea401d4e0c2f208981a5c6564a2ac12ac9776 /hugolib/page__meta.go | |
parent | 057b1377c5f4d0d80ee299293db06384a475ad19 (diff) | |
download | hugo-ccfaeb678b312535928af3451324a54f2c7cb199.tar.gz hugo-ccfaeb678b312535928af3451324a54f2c7cb199.zip |
hugolib: Add missing zero check on file
Diffstat (limited to 'hugolib/page__meta.go')
-rw-r--r-- | hugolib/page__meta.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go index 5b2d74d00..0e16292f0 100644 --- a/hugolib/page__meta.go +++ b/hugolib/page__meta.go @@ -728,8 +728,10 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo } var id string + var filename string if !p.f.IsZero() { id = p.f.UniqueID() + filename = p.f.Filename() } cpp, err := cp.New( @@ -737,7 +739,7 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo Document: newPageForRenderHook(ps), DocumentID: id, DocumentName: p.Path(), - Filename: p.f.Filename(), + Filename: filename, ConfigOverrides: renderingConfigOverrides, }, ) |