Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a section about handling Markdown notebooks #149

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions 00_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,31 @@ From the directory containing the notebooks:
```console
jupyter lab
```

## 8. Handling Notebooks in MyST-Markdown format

The Jupyter notebooks in this repository are in
[MyST-Markdown format](https://myst-nb.readthedocs.io/en/v0.13.2/use/markdown.html).
The [jupytext](https://jupytext.readthedocs.io/en/latest/index.html) package is
included in your `navo-env` environment to work with these notebooks. Note that
the `jupytext` package has to be installed before your Jupyterlab session starts.

To open one of these notebooks (in the `content/reference_notebooks` and the
`content/use_case_notebooks` subdirectories), in the Jupyterlab file panel,
right-click on the notebook, choose "Open With", and select "Notebook" or
"Jupytext Notebook" from the drop-down menu.
stargaser marked this conversation as resolved.
Show resolved Hide resolved

It is possible to change your Jupyterlab settings to allow double-clicking on a
Markdown notebook to open automatically as a Jupytext Notebook. In Jupyterlab,
navigate from the top-level menu item "Settings" and select "Settings Editor"
in the drop-down. In the left sidebar of the Setting Editor tab, select
"Document Manager". The display should look like the image included below. In
the "Default Viewers" section, add a `newKey` of `markdown` and a `New Value`
of `Jupytext Notebook`. This will allow a double-click to open the Markdown
notebooks appropriately.

![Jupyterlab Document Manager settings](_static/jupytext_settings.png "Open Notebooks with Jupytext")

## Additional Resources

- [Set up git](https://help.github.com/articles/set-up-git/)
Expand Down
Binary file added _static/jupytext_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading