ref: ccfaeb678b312535928af3451324a54f2c7cb199
parent: 057b1377c5f4d0d80ee299293db06384a475ad19
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Fri Jun 26 09:27:01 EDT 2020
hugolib: Add missing zero check on file
--- a/hugolib/page__meta.go
+++ b/hugolib/page__meta.go
@@ -728,8 +728,10 @@
}
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 @@
Document: newPageForRenderHook(ps),
DocumentID: id,
DocumentName: p.Path(),
- Filename: p.f.Filename(),
+ Filename: filename,
ConfigOverrides: renderingConfigOverrides,
},
)