Skip to content
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

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

Open
levity opened this issue Jul 16, 2024 · 4 comments
Open

Comments

@levity
Copy link

levity commented Jul 16, 2024

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
Copy link
Owner

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
Copy link
Owner

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

@levity
Copy link
Author

levity commented Sep 30, 2024

I see this note in the Meta Bind docs:

I am currently waiting for the Obsidian Team to deliver on promised improvements to the Obsidian Publish API. Until then, Meta Binds publish support will be broken. Use at your own risk.

Does that mean I should hold off on exploring this for now?

@mProjectsCode
Copy link
Owner

I think the only thing missing from the Obsidian Publish API for JS Engine are modals. Everything else should be doable with the minimalistic existing APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants