diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-05-24 12:49:45 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-05-24 12:49:45 +0200 |
commit | 32344fe3db862584e3f926d63bdf33b7fa7d22f7 (patch) | |
tree | f74d1a968f1862df7fc46f6ea896354e6014aef1 /hugolib/page__meta.go | |
parent | 4d7fa9f114c62ae2ec12257203ed21b0e4d69a04 (diff) | |
download | hugo-32344fe3db862584e3f926d63bdf33b7fa7d22f7.tar.gz hugo-32344fe3db862584e3f926d63bdf33b7fa7d22f7.zip |
Prevent WARNINGs in RenderString
Diffstat (limited to 'hugolib/page__meta.go')
-rw-r--r-- | hugolib/page__meta.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hugolib/page__meta.go b/hugolib/page__meta.go index 36c314d9d..435b95473 100644 --- a/hugolib/page__meta.go +++ b/hugolib/page__meta.go @@ -727,11 +727,16 @@ func (p *pageMeta) newContentConverter(ps *pageState, markup string, renderingCo return converter.NopConverter, errors.Errorf("no content renderer found for markup %q", p.markup) } + var id string + if !p.f.IsZero() { + id = p.f.UniqueID() + } + cpp, err := cp.New( converter.DocumentContext{ Document: newPageForRenderHook(ps), - DocumentID: p.f.UniqueID(), - DocumentName: p.f.Path(), + DocumentID: id, + DocumentName: p.Path(), ConfigOverrides: renderingConfigOverrides, }, ) |