rust-lang/mdBook

Preprocessor cannot add folders/files directly to book directory

niko-dunixi opened this issue · 1 comments

Hello!

I'm implementing a preprocessor that generates plantuml diagrams. It extracts codeblocks with the plantuml language, renders the SVG, and then places a markdown element to reference the image.

While I write my mdbook with mdbook serve I'm finding that I must place these rendered files in the src directory in order for them to appear in the book directory. If my preprocessor tries to put these files into the book path directly, they're immediately nuked.

Is there a way to programmatically tell mdbook that these dynamically created files are valid so they're not removed?

auser commented

I would absolutely love the ability to update the book.toml within a preprocessor. @ehuss commented on my issue #1687

I am able to update it within a preprocessor, just cannot find a way to reassign the current context to a new context address.