We have a link generator UI here. 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
% 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
We have a link generator UI here. However, this has a few drawbacks:
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.mdyou 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
% 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-linkor 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