Skip to content
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

Don't register hook callbacks again when site is regenerated #121

Closed
mojavelinux opened this issue Jul 4, 2016 · 1 comment
Closed

Don't register hook callbacks again when site is regenerated #121

mojavelinux opened this issue Jul 4, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@mojavelinux
Copy link
Member

The hook callbacks for pre_render and post_render are getting registered each time the site is regenerated. That's because generators are invoked each time the site is regenerated (even in the case of an incremental build) and we aren't checking whether the hook callbacks were already registered.

If we only register the hook callbacks once, we'll also need to switch to using static methods that delegate to their corresponding methods on the converter instance.

Finally, add a test to verify that the hook callbacks are not registered again when the the site is regenerated.

@mojavelinux mojavelinux added the bug label Jul 4, 2016
@mojavelinux mojavelinux added this to the v2.0.1 milestone Jul 4, 2016
@mojavelinux mojavelinux self-assigned this Jul 4, 2016
@mojavelinux
Copy link
Member Author

Resolved by 93fc608 (from PR #120).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant