I'm building a plugin to generate site-wide menus; the data for these menus comes from scanning the rendered DOM for *.html.md files; but I only use the menu in one place (root of the site).
Plugin currently generates each page's part of this menu in writeBefore
, which works fine as I walk the collection, handle each document, and write a file into the partials directory.
But since the docs have all been rendered already by that time, the <%- @partial('foo.html')%> call in my index.html.eco doesn't work unless I run docpad generate
twice.
I assumed that if I set renderPasses
to a value > 1, then the partials would get picked up on the > 1 pass, but that doesn't happen.
Is there an event I can use that's after an initial render (so there's a DOM to parse) but before partials get rendered?
Thanks.