Skip to content

Conversation

@waharnum
Copy link

We've been trying to update some sites to use the 6.82.x line of DocPad and encountered difficulties with the Handlebars plug-in where it wasn't passing in the helpers or partials defined in our docpad.js file.

I traced the errors and confirmed that they were present in this plug-in when using the 6.82.x line (tests failing with the same error log of missing helpers / partials).

This PR fixes the plug-in for the 6.82.x line by moving the call to super(config) from the bottom to the top of the plug-in's own setConfig method. This appears necessary to properly initialize the plug-in config to add the helpers and partials before the plugin tries to process them.

I'm far from an expert on Docpad's plugin architecture so this fix is at the level of "tests pass again, and fixes the problem for our sites", so please let me know if there's a better way to address this. I'm guessing the issue I've seen is related to this change to docpad-baseplugin that changes how config merging is handled: https://github.com/docpad/docpad-baseplugin/blob/master/HISTORY.md#v103-2018-september-7

@balupton
Copy link
Member

balupton commented Aug 1, 2019

I have become too preoccupied by other things to review, merge, and release this PR.

However, you should have received an invite a while ago to join the DocPad Extras Team, which will give you write access to this repository, so you can merge in the PR, and become one of the maintainers of this repository.

For an orientation, or if you need any assistance following the semi-automatic release process from CONTRIBUTING.md, reach out via https://bevry.me/discord/dev

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants