mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Improve .Content vs shortcodes
For the content from other pages in shortcodes there are some chicken and egg dependencies that is hard to get around. But we can improve on this by preparing the pages in a certain order: 1. The headless bundles goes first. These are page typically page and image collections.. 2. Leaf bundles 3. Regular single pages 4. Branch bundles Fixes #4632
This commit is contained in:
@@ -1865,14 +1865,15 @@ func getGoMaxProcs() int {
|
||||
|
||||
func (s *Site) newNodePage(typ string, sections ...string) *Page {
|
||||
p := &Page{
|
||||
language: s.Language,
|
||||
pageInit: &pageInit{},
|
||||
Kind: typ,
|
||||
Source: Source{File: &source.FileInfo{}},
|
||||
Data: make(map[string]interface{}),
|
||||
Site: &s.Info,
|
||||
sections: sections,
|
||||
s: s}
|
||||
bundleType: bundleBranch,
|
||||
language: s.Language,
|
||||
pageInit: &pageInit{},
|
||||
Kind: typ,
|
||||
Source: Source{File: &source.FileInfo{}},
|
||||
Data: make(map[string]interface{}),
|
||||
Site: &s.Info,
|
||||
sections: sections,
|
||||
s: s}
|
||||
|
||||
p.outputFormats = p.s.outputFormats[p.Kind]
|
||||
|
||||
|
Reference in New Issue
Block a user