Skip to content

Commit fa1016d

Browse files
choldgrafagoose77
andauthored
Document the launch button functionality (#2046)
* Document the launch button functionality * Update docs/website-launch-buttons.md Co-authored-by: Angus Hollands <[email protected]> * Update docs/website-launch-buttons.md Co-authored-by: Angus Hollands <[email protected]> * Update docs/website-launch-buttons.md --------- Co-authored-by: Angus Hollands <[email protected]>
1 parent d09a748 commit fa1016d

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

docs/images/launch-button-menu.png

89.9 KB
Loading

docs/myst.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 1
22
project:
33
title: MyST Markdown
44
github: https://github.com/jupyter-book/mystmd
5+
# jupyter: true # Uncomment to test launch buttons
56
license:
67
code: MIT
78
content: CC-BY-4.0
@@ -109,6 +110,7 @@ project:
109110
- file: reuse-jupyter-outputs.md
110111
- file: interactive-notebooks.ipynb
111112
- file: integrating-jupyter.md
113+
- file: website-launch-buttons.md
112114
- file: notebook-configuration.md
113115
- file: md-vs-ipynb.md
114116
- title: Websites

docs/notebook-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
title: Notebook Configuration
2+
title: Add metadata to notebooks
33
---
44

55
In Jupyter Notebooks you can add cell level configuration by specifying **tags** in the cell metadata.
66
There are also global controls in the [project settings](#project-settings).
77

88
(notebook-cell-tags)=
99

10-
### Notebook Cell Tags
10+
## Notebook Cell Tags
1111

1212
Tags are a list of strings under the `tags` key in the cell metadata, which can be set in JupyterLab, VSCode or in a {myst:directive}`code-cell` directive.
1313

docs/website-launch-buttons.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Launch Jupyter sessions
3+
---
4+
5+
You can add a button to your MyST website that launches a Jupyter environment in the cloud and opens the current file in the editor. If the file is a Jupyter Notebook (`.ipynb` file) or a MyST document with code-cells[^lab-myst], users can use the Jupyter environment to run the code cells and inline expressions.[^thebe]
6+
7+
[^thebe]: This is a fully-interactive Jupyter environment. If you'd instead like like to provide interactivity to the same page, see [](./integrating-jupyter.md).
8+
[^lab-myst]: Interacting with MyST Markdown documents is only supported in JupyterLab with [the `jupyterlab-myst` extension](https://jupyter-book.github.io/jupyterlab-myst/) installed.
9+
10+
:::{caution} Launch buttons are experimental!
11+
We are still learning the best UX and configuration to control launch buttons, so they may change in the future!
12+
:::
13+
14+
## Add a Jupyter server launch button
15+
16+
To add a launch button to your project, ensure your project has GitHub configuration in your [project or page frontmatter](./frontmatter.md), then use the `project.jupyter: true` configuration. For example:
17+
18+
```yaml
19+
project:
20+
github: jupyter-book/mystmd
21+
jupyter: true
22+
```
23+
24+
This will add a "launch button" to the top of each page. Clicking the button will open a menu where you can paste in the URL of a JupyterHub or BinderHub to launch your content.
25+
Here's what it looks like:
26+
27+
```{figure} ./images/launch-button-menu.png
28+
:width: 75%
29+
The launch button menu allows you to launch Jupyter servers on a JupyterHub or a Binder service. You can paste in the URL of the JupyterHub / BinderHub instance where you'd like to launch your content.
30+
```
31+
32+
When you click {kbd}`Launch`, a Jupyter session will launch on the hub URL you've provided, and the source file of the current page will open.

0 commit comments

Comments
 (0)