Opened 3 years ago

Last modified 2 years ago

#20690 closed enhancement

Live documentation in Jupyter using Thebe — at Version 8

Reported by: nthiery Owned by:
Priority: major Milestone: sage-7.4
Component: documentation Keywords: days77, jupyter, thebe, notebook, sd75
Cc: vdelecroix, vbraun, rbeezer, slelievre, tmonteil Merged in:
Authors: Florent Cayré, Nicolas M. Thiéry Reviewers:
Report Upstream: N/A Work issues:
Branch: public/live_documentation_in_jupyter_using_thebe-20690-experimental Commit: 19f31f8567ac77094d2ee483e7adf9d6963a8dd7
Dependencies: Stopgaps:

Description (last modified by nthiery)

Thebe is a Jupyter javascript plugin for static sites that allows for rendering selected divs of the HTML as live cells connected to a Jupyter server:

https://oreillymedia.github.io/thebe/

The idea is to use this technology to make

Steps:

  • [X] Configure Sphinx to add the Thebe javascript library in the static page
  • [ / ] Configure Sphinx to add a small header to our html page with:
    • [X] Inclusion of the Thebe javascript
    • [x] Thebe configuration: which divs to make live

Currently, we include all <pre> tags that contain sage:

  • [ ] Thebe configuration: use the Jupyter instance serving the page

We use window.location.origin; is this the right thing to do?

  • [ ] Only activate Thebe if running inside a Jupyter server
  • [x] A button to activate live cells
  • [ ] Possibly a menu or other widgets for user customization of the server configuration
  • ? Configure the Jupyter notebook in Sage to somehow provide the server configuration to Thebe.
  • Customize/configure Thebe to support Sage's doctest syntax:
    • [ ] Stripping out the prompts
    • [ ] Stripping out the included outputs (bonus: show the included outputs below the cell until the new output is computed)
    • [ ] Support doctests with several commands by spliting into several cells

Change History (8)

comment:1 Changed 3 years ago by nthiery

  • Branch set to u/nthiery/live_documentation_in_jupyter_using_thebe

comment:2 Changed 3 years ago by nthiery

  • Branch changed from u/nthiery/live_documentation_in_jupyter_using_thebe to public/live_documentation_in_jupyter_using_thebe-20690

comment:3 Changed 3 years ago by nthiery

  • Commit set to 19f31f8567ac77094d2ee483e7adf9d6963a8dd7
  • Description modified (diff)
  • Summary changed from Live documentation in Jupyter using thebe to Live documentation in Jupyter using Thebe

New commits:

19f31f820690: added some examples of sage code in a fast-to-compile document. DONT MERGE IN SAGE

comment:4 Changed 3 years ago by nthiery

  • Branch changed from public/live_documentation_in_jupyter_using_thebe-20690 to public/live_documentation_in_jupyter_using_thebe-20690-experimental

comment:5 Changed 3 years ago by nthiery

  • Branch changed from public/live_documentation_in_jupyter_using_thebe-20690-experimental to public/live_documentation_in_jupyter_using_thebe-20690

The current branch is not to be merged in Sage, as it contains some edits in the Sage's faq that are just here for quick testing (compiling the faq is fast!).

comment:6 Changed 3 years ago by nthiery

  • Branch changed from public/live_documentation_in_jupyter_using_thebe-20690 to public/live_documentation_in_jupyter_using_thebe-20690-experimental

comment:7 Changed 3 years ago by nthiery

  • Description modified (diff)

comment:8 Changed 3 years ago by nthiery

  • Description modified (diff)
Note: See TracTickets for help on using tickets.