Skip to content

Commit 8030176

Browse files
authored
Add dogfooding instructions for MyST previews with jupyter-myst-build-proxy (#23)
1 parent 63d61c6 commit 8030176

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

for-instructors/dogfooding.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,31 @@ Once you've set up GitHub authentication, you can use Git normally.
1919

2020
## Previewing the MyST site
2121

22-
TODO
22+
We have installed
23+
[`jupyter-myst-build-proxy`](https://github.com/ryanlovett/jupyter-myst-build-proxy)
24+
which builds the MyST site on-demand.
25+
26+
See [](../reference/04-using-myst.md) for instructions.
27+
28+
29+
### Tradeoffs
30+
31+
This extension uses the `myst build --html` command instead of `myst
32+
start`
33+
([read more here](https://github.com/ryanlovett/jupyter-myst-build-proxy/issues/8)).
34+
As a consequence, builds are not triggered automatically when edits are performed.
35+
36+
There is currently no known way to use the MyST preview server `myst start` in a
37+
JupyterLab environment. See https://github.com/jupyter-book/mystmd/issues/302
38+
39+
40+
#### Pros
41+
42+
* User doesn't need to run anything in the terminal to build their site
43+
* Handles BASE_URL concerns implicitly
44+
45+
46+
#### Cons
47+
48+
* Not portable to local usage after the workshop
49+
* Builds only occur when manually triggered

reference/04-using-myst.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 📝 Using MyST
2+
3+
## Previewing your MyST site
4+
5+
### First time
6+
7+
To view your built site:
8+
9+
* Copy the URL of your server (e.g. Matt's URL is
10+
`https://hub.cryointhecloud.com/user/mfisher87/lab`)
11+
* Open a new browser tab
12+
* Paste the URL in the URL bar
13+
* Replace `/lab` with `/myst-build/$DIRECTORY_OF_MYST_PROJECT`; for example, Matt's
14+
project is at `~/workshop-open-source-geospatial`, so his URL would be
15+
`https://hub.cryointhecloud.com/user/mfisher87/myst-build/workshop-open-source-geospatial`.
16+
17+
At this point you should see the build progress in your browser.
18+
It should only take a few seconds, and then you'll see your fully-built MyST site!
19+
20+
21+
### Subsequent builds
22+
23+
Your site will not automatically rebuild when you make changes!
24+
This functionality will be available in the future.
25+
26+
Append `/?rebuild=1` to the URL to trigger a rebuild.

0 commit comments

Comments
 (0)