-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Custom Preprocessors #792
Custom Preprocessors #792
Conversation
I think I've got the basic idea implemented, and the example program works exactly as I'd expect. This will need a proper review and we may want to bikeshed on the nuances of how information is passed/received from the subcommand though. Plus I still need to create a new page in the user guide. |
One thing I'd like to see mentioned in the docs is the handling of multiple preprocessors: Are they executed in the specified order? And another thing: Will the input/output format be documented somewhere? This would make writing preprocessor not based on the mdbook lib possible (e.g. in other languages) |
In general, I believe it'll run default preprocessors first then all other preprocessors will be run in the order they were defined in
At the moment the format is a JSON array where the first element is In the long term it should probably be documented, but that would mean we also need to document (and stabilize) the entire internals for |
I think this implementation for custom preprocessors is a good starting point. I've merged it so people can start using it in real-life scenarios (like @badboy's) as of the next release. |
Thanks! |
…cessor WIP: Custom Preprocessors
This lets anyone provide their own custom preprocessor by shelling out to the provided command.
CC: #762, @badboy