dependencies - In what order does DocPad render documents? -


say i'm building blog docpad has listing document , bunch of posts (in filtered collection). listing displays beginning of content of each post using document.contentrenderedwithoutlayouts. (how?) docpad make sure posts rendered before rendering listing?

a quick debug run docpad -d --env static run suggests listing rendered every time new post rendered. right?

what if there's cycle? 1 of posts wants listing's contentrenderedwithoutlayout?

:) docpad gets super smart :)

whenever template helper call fetch document isn't own, take note of , set referencesothers meta data property true. proceed render of documents don't reference others first, render reference others.

this why when modify layout, regenerate documents use it. when modify blog post, we'll regenerate listings of blog post.

if have circular references, notify of such occurrence has occurred , recommend increase renderpasses configuration property ensure renders enough times useful.

the exact code behind render passes here: https://github.com/bevry/docpad/blob/v6.32.0/src/lib/docpad.coffee#l2567-l2579


Comments