jupyterhub / jupyterhub/nbgitpuller

Create a myst plugin for re-usable nbgitpuller link generator UIs

Open
#395 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
237
Forks
86
PR merge metrics
No merged PRs in 30d

Description

We have a [link generator UI here](https://nbgitpuller.readthedocs.io/en/latest/link.html). However, this has a few drawbacks:

- Users have to remember the link, and generally have to remember to go to a place that is not their own documentation
- The UI has a lot of flexibility, so you'd need to do a lot of typing

However a lot of users are generating links for a specific set of documentation tied to a specific JupyterHub. In those cases, it might be helpful if their documentation could provide its own nbgitpuller link generator UI. For example:

### Example usage

In `link-generator.md` you could use a **directive** that is controlled with **YAML config in its body** and this controls the output which is a UI that lets you generate nbgitpuller links.

You could pre-populate it with parameters when you write the directive, and do things like simplify the UI if you wanted to make certain fields pre-filled (like the hub URL).

For example, the following would generate the nbgitpuller link generator with hub.myorg.edu pre-filled

```markdown
% First item is the default, if there are multiple items it becomes a dropdown / single-select
:::{nbgitpuller-link-generator}
hub: hub.myorg.edu
open:
- lab
- notebook
- foo
namedserver:
- option1
- option2
:::
```

Then you could serve that at a site like `docs.myorg.edu/hub-link` or something. It would be much more memorable and give a little bit of control by the administrator / docs author.

### Implementation

We could make a Sphinx extension for this, or a mystmd plugin - it shouldn't be very difficult in either case! If mystmd, it'd need to use the new [anywidget interface](https://mystmd.org/guide/widgets)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.