mProjectsCode / obsidian-js-engine-plugin

https://www.moritzjung.dev/obsidian-js-engine-plugin-docs/
GNU General Public License v3.0
73 stars 5 forks source link

Any interest in figuring out how this could work with Obsidian Publish? #18

Open levity opened 1 month ago

levity commented 1 month ago

Obsidian Publish allows you to upload a publish.js file to run arbitrary JS on your published site, which could be used as a starting point for parsing and executing js-engine code blocks on published pages.

I'm curious to hear how easy or difficult you think this would be, and would be happy to contribute to making it happen. I'm new to the world of Obsidian plugins, so I don't know how feasible it would be to expose the same API (or polyfill/shim it) in a published, in-browser context.

mProjectsCode commented 1 month ago

It is doable. A lot of API won't work in publish, but we could just throw a custom error that says that this API method is not available in publish.

mProjectsCode commented 1 month ago

The approach would be similar to what I did in Meta Bind.