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

Run post-build after all other plugins #23

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Conversation

percevalw
Copy link
Contributor

Description

mkdocs-gen-files deletes its temporary directory during the post_build event, but some other plugins like mkdocs-i18n use the files generated during this event as well, but also require them to be generated beforehand (during the on_files event).

While it is still possible to place the plugin at the top of the mkdocs plugins list to solve the on_files dependency, this also results in the cleanup being run first. Fortunately, as of mkdocs 1.4, we can order the execution of events with the event_priority decorator.

This PR proposes to decorate the on_post_build method so that it always executes last.

Copy link
Owner

@oprypin oprypin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@oprypin oprypin merged commit 10034c5 into oprypin:master Apr 27, 2023
@oprypin
Copy link
Owner

oprypin commented Apr 27, 2023

And released.

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

Successfully merging this pull request may close these issues.

2 participants