LibCST icon indicating copy to clipboard operation
LibCST copied to clipboard

Docs: Tutorial prose poorly rendered in mybinder

Open pelson opened this issue 4 years ago • 1 comments

Thanks for providing the mybinder.org links to allow convenient running and modification of the examples in the tutorial! This is a really nice feature of the docs :+1:.

When looking at the tutorial through the rendered site we get nice text/prose with links to the relevant parts of the docs, etc. However when running the tutorial in mybinder the raw restructuredtext cells get rendered as raw cells, without all of the helpful links and nicely rendered structure.

For example, the metadata tutorial at https://libcst.readthedocs.io/en/latest/metadata_tutorial.html looks like the following in mybinder:

Screenshot from 2021-01-22 07-34-38

Is there a mechanism that allows you to render the rST based on the appropriate sphinx context (e.g. turn :class:`~libcst.Call` into a link to the docs) as either html or markdown, and inject that into a derived notebook which is presented to the user perhaps?

FWIW the "currently enabled toolbar" configuration is stored inside the notebook, in this case you can find the block "celltoolbar": "Edit Metadata", at the end of the notebook at https://raw.githubusercontent.com/Instagram/LibCST/master/docs/source/matchers_tutorial.ipynb. Perhaps stripping other parts of the notebook metadata before committing makes sense too (e.g. the kernelspec and python version).

pelson avatar Jan 22 '21 06:01 pelson

See also #1054: Now, binder does not start

AlbertMietus avatar Nov 19 '23 12:11 AlbertMietus