diff options
author | Bjørn Erik Pedersen <[email protected]> | 2023-03-05 10:32:00 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2023-03-05 12:51:57 +0100 |
commit | b83050cb40fc11ba36ca2680467fd8d4c6f2e516 (patch) | |
tree | 318b1b7edd0ea3d2a97f352c90bb215e46429de7 /hugolib/page__output.go | |
parent | df5608f8a0706c6519f50b5497e36c21b8e790be (diff) | |
download | hugo-b83050cb40fc11ba36ca2680467fd8d4c6f2e516.tar.gz hugo-b83050cb40fc11ba36ca2680467fd8d4c6f2e516.zip |
Fix .Fragments when called cross sites on uninitialized output format
Fixes #10794
Diffstat (limited to 'hugolib/page__output.go')
-rw-r--r-- | hugolib/page__output.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/hugolib/page__output.go b/hugolib/page__output.go index ae2fdb778..25ce26b7a 100644 --- a/hugolib/page__output.go +++ b/hugolib/page__output.go @@ -54,12 +54,13 @@ func newPageOutput( } po := &pageOutput{ - f: f, - pagePerOutputProviders: providers, - ContentProvider: page.NopPage, - PageRenderProvider: page.NopPage, - render: render, - paginator: pag, + f: f, + pagePerOutputProviders: providers, + ContentProvider: page.NopPage, + PageRenderProvider: page.NopPage, + TableOfContentsProvider: page.NopPage, + render: render, + paginator: pag, } return po @@ -84,6 +85,7 @@ type pageOutput struct { pagePerOutputProviders page.ContentProvider page.PageRenderProvider + page.TableOfContentsProvider // May be nil. cp *pageContentOutput @@ -96,6 +98,7 @@ func (p *pageOutput) initContentProvider(cp *pageContentOutput) { p.contentRenderer = cp p.ContentProvider = cp p.PageRenderProvider = cp + p.TableOfContentsProvider = cp p.cp = cp } |