Skip to content

Make launch button configuration more extensible and flexible #462

Description

@choldgraf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🏷️ configurationRelated to our API and configuration values

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions