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

Deprecation/Removal of parseBefore, parseAfter events #736

balupton opened this Issue Dec 13, 2013 · 7 comments


None yet
3 participants

balupton commented Dec 13, 2013

The parseBefore and parseAfter events have-been/will-be deprecated in DocPad v6.58.

This was necessary for the following reasons:

  1. We have-been/are moving away from a scheduled generation style, into a reactive generation style

  2. Issue #734 required dynamic documents to go through the proper generation cycle, rather than just the render file cycle, in order to have access to the render events templateData amendments, which it previously had no way of accessing.

    Adding the dynamic documents directly to the generation queue meant that we had to adjust the way files are loaded, as we want to ensure dynamic documents, just like other documents, are always up to date with their source (file-system) data.

    To accomplish this, we removed the partial then complete loading that was there before, in order to load files completely as they are found and injected, rather than at scheduled cycles. This ensures that documents are always up to date, without needing to go through generation cycles in order to be so.

What this means, is that we have removed the parseBefore and parseAfter events, in favour of loading/parsing documents as we find them, rather than altogether in a generation queue.

This has affected the following plugins, of which updates have been released:

The following plugins still need adjustment:

  • None reported yet

If you were previously using the parseAfter or parseBefore events, we'd recommend reviewing the way they have been fixed with the aforementioned plugins, or posting a comment here and we'll figure out a migration path for your plugin.


This comment has been minimized.


balupton commented Dec 13, 2013

Changes pushed to the reactiveloading loading branch.


This comment has been minimized.


greduan commented Dec 13, 2013

Guess I'm gonna have to learn how reactive design works eh? :)


This comment has been minimized.

dimitarkolev commented Dec 14, 2013

Where we can find the updated plugins for reference. All our custom plugins depend on pasrse events so it will be a huge rewrite and i want to be prepared before the release of the version.


This comment has been minimized.

dimitarkolev commented Dec 15, 2013

What about renderBefore and renderAfter event are they going to be deprecated as well?


This comment has been minimized.


balupton commented Dec 15, 2013

Thanks for the questions!

Will push up the new plugins Monday.

renderBefore, renderAfter, contextualizeBefore, contextualizeAfter, and the other events will remain.

As an immediate workaround, you should be able to just rename parseAfter, and parseBefore to contextualizeAfter and contextualizeBefore. However, you will be better off doing something like the updates in the plugins that will be pushed later on, as it will be more efficient and have a better chance at catching events for imported documents — something that already impacts the parse events.

balupton added a commit that referenced this issue Dec 16, 2013

v6.58.0. Improvement.
- v6.58.0 December 16, 2013
	- Deprecated and removed the `parseBefore` and `parseAfter` events
		- Files are now parsed as they are loaded in, rather than only when
they reach the generation cycle
		- See [issue #736](#736) for
discussion and upgrade options
	- Dynamic documents now have access to templateData that plugins have
extended (regression since always)
		- Dynamic documents now go through the standard generation process
		- Thanks to [Steve McArthur](,
[Marcus Stong]( for
	- Documents that want to be rendered, but not written, are now
rendered (possible regression since v6.55.0)
		- Thanks to [pflannery]( for [issue
	- Moved the missing layout error check from contextualize step to
render step, as the layout may not be there if we are still loading

This comment has been minimized.


balupton commented Dec 16, 2013

Release has been done. Plugins have been published. See the original post in this thread for links to the diffs.

@balupton balupton closed this Dec 16, 2013

balupton added a commit to docpad/documentation that referenced this issue Dec 16, 2013


This comment has been minimized.

dimitarkolev commented Dec 16, 2013

10x looks great. I have a question about live collections. Is there a place where we can find some more documentation and/or examples?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment