Opening a jupytext-powered notebook under jlab

Hiya there

we’ve been using the classic notebook up to now, and this being no longer maintained, I am giving another go at finding a more modern replacement

in our use case we’d need the ability to craft a URL to directly open a specific notebook; and most of our notebooks are jupytext-powered notebooks - say .md files

I can open regular ipynb files by opening lab/tree/path/foo.ipynb

The same scheme with a jupytext notebook like foo.md won’t work, this results in opening a markdown editor (just like clicking foo.md from the UI, and from the UI I need to right-click on the file to select open withNotebook)

Is there a way around this ?

many thanks in advance for any tip or clue

1 Like

This doesn’t seem possible yet, please see this issue:

Seems like they should just implement their own ?jupytext=path/to/notebook.md router.

right now this is working for me under jlab

for the record, I can’t retrieve where exactly I got this recipe from, but here’s what i have in place

cat ~/.jupyter/labconfig/default_setting_overrides.json
{
  "@jupyterlab/docmanager-extension:plugin": {
    "defaultViewers": {
      "markdown": "Jupytext Notebook",
      "myst": "Jupytext Notebook",
      "r-markdown": "Jupytext Notebook",
      "quarto": "Jupytext Notebook",
      "julia": "Jupytext Notebook",
      "python": "Jupytext Notebook",
      "r": "Jupytext Notebook"
    }
  }
}

this won’t work for retrolab though…

2 Likes