summaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-06-26 13:27:01 +0200
committerBjørn Erik Pedersen <[email protected]>2020-06-26 13:27:01 +0200
commitccfaeb678b312535928af3451324a54f2c7cb199 (patch)
treec67ea401d4e0c2f208981a5c6564a2ac12ac9776 /hugolib
parent057b1377c5f4d0d80ee299293db06384a475ad19 (diff)
downloadhugo-ccfaeb678b312535928af3451324a54f2c7cb199.tar.gz
hugo-ccfaeb678b312535928af3451324a54f2c7cb199.zip
hugolib: Add missing zero check on file
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/page__meta.go4
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,
},
)