-
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
[preprocessors] include support for style/script #1689
Comments
This sounds like a duplicate of #1687 (which was opened a few hours ago) and #1222 if I am understanding you correctly. You want to have a preprocessor to add additional synthesized |
Seem like similar symptoms. It's kind of bundler-like loader. |
So turning everything mutable has it's own issues. What do you think about having a preprocessor step that occurs before the preprocessing |
I don't think making the config mutable is really the right approach. A problem with adding CSS and JS is that those are HTML-specific, but the preprocessors are renderer agnostic. I could imagine extending the return value of the preprocessor to include additional instructions, like "include these javascript files". And somehow renderers could receive those instructions and adjust its behavior accordingly. For things like #1222, I would imagine that extra files could also be included. I don't know exactly what that structure would look like, or what the evolution would look like, though. For example, files could be passed in JSON, but I don't know if there is a performance concern there, and maybe providing a directory for preprocessors to pass in files would be better? Also, should things like javascript be specific for the HTML renderer, or should that just be for the HTML renderer only? |
I'm going to close as a duplicate of the linked issues above. |
Include style/script - feature support
MD interpolation support including other MD files or partials of it
{{#include /path/to/file.md}}
.will it be possible to also support script and styles
which might not be present in deployment
note that supporting local assets can get a little complex when the assets are not present in deployment. for example there could be built assets or that assets depend on 3rd (node_modules). so if the feature request is applicable, could we consider compiling these assets to the book build?
The text was updated successfully, but these errors were encountered: