From e590cc26eb1363a4b84603f051b20bd43fd1f7bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 19 Apr 2018 12:04:34 +0200 Subject: 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 --- hugolib/hugo_sites_build.go | 1 + 1 file changed, 1 insertion(+) (limited to 'hugolib/hugo_sites_build.go') diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 1c4ee7b63..dcff4b3b2 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -224,6 +224,7 @@ func (h *HugoSites) render(config *BuildCfg) error { s.initRenderFormats() for i, rf := range s.renderFormats { s.rc = &siteRenderingContext{Format: rf} + s.preparePagesForRender(config) if !config.SkipRender { -- cgit v1.2.3