networkx / nx-guides

Examples and Jupyter Notebooks about NetworkX
https://networkx.org/nx-guides/
Creative Commons Zero v1.0 Universal
188 stars 104 forks source link

Improve per-page binder integration #30

Open rossbar opened 3 years ago

rossbar commented 3 years ago

The sphinx-book-theme has a really nice feature that maps each page with executable code to a direct binder link. However, I think we want to stick with the pydata-sphinx-theme to have thematic consistency with the main nx docs, and unfortunately the per-page launch feature doesn't quite work out of the box.

You can still access all the notebooks on binder, but it's annoying for two reasons:

  1. the user has to click through from the root of the repository to the notebook they want and
  2. The user has to right-click and select "open as notebook" on binder.

We definitely want the original behavior from the sphinx-book-theme - I think there are two ways we could potentially get it back:

  1. Jinja templates + macros for URL remapping
  2. upstreaming the functionality from sphinx-book-theme either to the pydata theme, to myst-nb, or pulling it out as a separate sphinx extension. See executablebooks/sphinx-book-theme#326