New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-detect the amount of renderPasses needed #359
Comments
Use cases which pop up a lot. MenusYour layout does a listing of all the pages you have. Each page uses that layout. Therefore each page refers to itself. Possible if just referring meta data, if referring rendered content, impossible. ListingsDoing a blog post listing that contains all the rendered content of the blog posts. One level of reference (listing to posts). References use rendered content. Combining ExamplesRan into this when writing API documentation for some client work. Had the issue where B uses A, C uses B, D uses C which fails on the two pass render as there are 3 levels of reference, not just one. References use rendered content. |
- v6.16.0 December 4, 2012 - The amount of render passes is now customisable via the `renderPasses` configuration option, defaults to `1` - Increment this value dependening on how many levels of cross-document references you have (e.g. 2 passes for C includes B, B includes A) - The render pass functionality has been changed to render all documents that don't reference anything else first, then for each additional render pass, render documents that do reference others - Previously it would render both types of documents in the one batch, which resulted in hit and miss results - Doing this, we now safely have the default `renderPasses` value set to `1` which has the same effect as the traditional `2` render pass - Refer to [issue #359](#359) for more information
Okay, so DocPad v6.16 now lets you customise how many renderPasses are required. A big change here over the way things were previously done is that we now split the initial render batch into two parts - rendering everything that doesn't reference others, then rendering everything that does reference others - and any subsequent passes will only re-render things that do reference others. It's a good step forward, but an intelligent algorithm for building up a single render pass remains ideal. |
- v6.16.0 December 4, 2012 - The amount of render passes is now customisable via the `renderPasses` configuration option, defaults to `1` - Increment this value dependening on how many levels of cross-document references you have (e.g. 2 passes for C includes B, B includes A) - The render pass functionality has been changed to render all documents that don't reference anything else first, then for each additional render pass, render documents that do reference others - Previously it would render both types of documents in the one batch, which resulted in hit and miss results - Doing this, we now safely have the default `renderPasses` value set to `1` which has the same effect as the traditional `2` render pass - Refer to [issue #359](#359) for more information
DocPad allows documents to reference each other - for example display listing of blog posts, or including the result of one file in another file.
So far we have handled this by doing a two pass render (so re rendering everything twice), however for references deeper than one, the 2 pass render is not enough (e.g. document b requires a, and document c requires b - in this example, document c wouldn't render correctly, however document b would - we would need a 3 pass render to do this).
We need a way to more intelligently handle these situations.
Issues to consider:
referencesOthers
flag, however we currently do not have a way to know what documents a document references - is possible to add this though.Work is being done on this on the
dev-render
branch.Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: