Open GerkinDev opened 3 weeks ago
I'm confused about what you're trying to do. The plugin cannot include js from other plugins because plugins rely on obsidian's API. Can you describe in more detail what you want?
Simply having some assets (JS in that case) copied to outputs and referenced in pages
Have you tried using the custom head content?
No, I did not see this option, I could get around with it indeed. But it would still be pretty useful if it was doable automatically for other plugins.
I'm writing one, to embed 3D models, and if you were able to auto embed some JS/CSS files, I would gladly use it so that I can push that plugin and say it is exportable to HTML via your plugin
I want to, in the future add a sort of plugin feature where plugins can supply their own content to the exports. Or where user created features can be easily downloaded. In the future this will work for your needs, but that is a little ways away still.
That would be absolutely awesome, and indeed may match my need. But maybe this wide idea can be broken down to simpler, easier to implement features ?
Anyway, I'll try to use custom headers like you suggested, and see if it works. If it doesn't, I'll fork your plugin to add a minimal example of something I need that works for me, open a PR and let you free to take it, reject it or alter it the way you like. This is the Open Source way :)
Sure, there are a lot of features that could be added in small parts though. So I prefer to focus on one feature at a time and implement it fully. Feel free to make a PR, if you do make sure to work in the beta branch and not the master branch.
Is your feature request related to a problem? Please describe. I cannot make my editor plugins relying on javascript work.
Describe the solution you'd like I would like to be able to list some JS files to import in exported pages.
Describe alternatives you've considered The plugin could automatically embed other plugin's js file with a certain name, like
export.js
. Thus,.obsidian/plugins/my-plugin/export.js
would be copied in output dir asassets/plugins/my-plugin.js
(and eventuallyassets/plugins/my-plugin.css
)This way, plugin authors can separate the processing part from
registerMarkdownCodeBlockProcessor
orregisterMarkdownProcessor
from the actual dom interactivity.Additional context Add any other context or screenshots about the feature request here.