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

Make launch button configuration more extensible and flexible #462

Open
choldgraf opened this issue Jan 14, 2022 · 1 comment
Open

Make launch button configuration more extensible and flexible #462

choldgraf opened this issue Jan 14, 2022 · 1 comment
Labels
🏷️ configuration Related to our API and configuration values

Comments

@choldgraf
Copy link
Member

Description

Over time people have contributed several extensions to our launch button infrastructure. Instead of just having two options of Binder or JupyterHub, we've now also got options for Colab (and Deepnote on the way). Moreover, we've had cases where people wanted to provide launch buttons for multiple JupyterHubs, and the current setup is not extensible in this way.

Instead, we could have users configure their launch button links via a list of entries, where each entry was a dictionary that defined the configuration for that link.

Guide for implementation

Here's one example of a more configurable structure we could use for inspiration:

html_theme_options = {
  "launch_buttons": [
    {"type": "jupyterhub", "url": "hub.myorg.edu"},
    {"type": "jupyterhub", "url": "otherhub.org2.edu"},
    {"type": "binder", "url": "mybinder.org"},
    {"type": "colab"},  # Because there's only one deepnote, we don't need url
    {"type": "deepnote"},  # Because there's only one deepnote, we don't need url
    {"type": "custom", "icon": "fontawesome class", "url_pattern": "https://myorg.com/{org}/{repo}/{path_to_page}"}  # This could be a way to specify custom launch URLs if desired
  ]
}

This would allow people more flexibility and control over their launch buttons, and be an easier extension point than our currently messy combination of configuration flags and values. This is similar to how the pydata theme does their icons.

@choldgraf choldgraf added the 🏷️ configuration Related to our API and configuration values label Jan 14, 2022
@mlucool
Copy link

mlucool commented Apr 6, 2022

We would find this useful too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ configuration Related to our API and configuration values
Projects
None yet
Development

No branches or pull requests

2 participants