-
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
Preprocessor cannot add folders/files directly to book directory #1222
Labels
A-Preprocessor
Area: Preprocessors
Comments
niko-dunixi
changed the title
Preprocessor cannot add folders/files directly to build directory
Preprocessor cannot add folders/files directly to book directory
May 13, 2020
This was referenced Nov 15, 2021
daprilik
added a commit
to microsoft/openvmm
that referenced
this issue
Oct 30, 2024
Closes #150. This PR adds infrastructure to support using mdbook plugins when compiling the OpenVMM guide. To get started, I added support for two particularly useful plugins: `mdbook-admonish` and `mdbook-mermaid`. I also quickly skimmed through the guide, and switched over a bunch of ad-hoc `> NOTE` blocks over to using admonishments, which really spruced up the Guide. For example: ![image](https://github.com/user-attachments/assets/2e825687-572a-4616-abdf-05c35c6a1fa6) ...turns into ![image](https://github.com/user-attachments/assets/33de2faf-9739-4642-9c95-a84223697e5c) * * * The approach I've taken to integrate these plugins is a _little_ unorthodox, as I really didn't want to check in big blobs of minified JS and CSS right into our repo. Instead, I've written a small openvmm-specific "shim" preprocessor, which works around rust-lang/mdBook#1222 by dynamically invoking the plugins's `install` subcommands as part of the build, and adding the injected artifacts to the Guide's `.gitignore` to ensure they aren't committed during local dev. In addition, the shim lets `flowey` override the command path to the various preprocessors, precluding the need to install those binaries into the user / CI machine's $PATH.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 thesrc
directory in order for them to appear in thebook
directory. If my preprocessor tries to put these files into thebook
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?
The text was updated successfully, but these errors were encountered: