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

Voila handler plugin #198

Open
martinRenou opened this issue Jun 6, 2019 · 2 comments
Open

Voila handler plugin #198

martinRenou opened this issue Jun 6, 2019 · 2 comments

Comments

@martinRenou
Copy link
Member

It is currently possible to create your own template, but I find it quite limited in terms of features. What are the plans for allowing people to create their own handlers as plugins for Voila?

@martinRenou martinRenou changed the title Voila plugin Voila handler plugin Jun 6, 2019
@SylvainCorlay
Copy link
Member

This is more in scope for jupyter_server. You can check out the work by @Zsailer on ExtensionApp and the like.

@Zsailer
Copy link
Member

Zsailer commented Jun 6, 2019

This presents an interesting use-case I haven't considered yet—extending a server extension! Fortunately, I believe it's already possible inside the ExtensionApp class, though I'll need to do some testing.

(The comments below assume that Voila will eventually inherit the soon-to-be-merged extension API in jupyter_server.)

There are three traits in ExtensionApp that you can configure in a Voila config file to make this possible:

  • handlers trait: an empty list where you can append (endpoint, handler) and jupyter_server will serve these handlers with the appropriate base_url, default_url, and static_url (if you're serving static files).
  • static_paths trait: an empty list where you can append file paths to custom JS + CSS for your Voila plugin.
  • template_paths trait: an empty list where you can append file paths to custom HTML templates for your plugin as well.

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

3 participants