Skip to content

Commit c3499bd

Browse files
committed
some content for local testing of xrefs
1 parent 60bea0c commit c3499bd

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

content/external.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,46 @@ MyST Supports cross-referencing into external content in order to create figures
77

88
![](xref:guide#img:altair-horsepower)
99

10-
1110
## An External Embed!
1211

1312
:::{embed} xref:guide#img:altair-horsepower
14-
:::
13+
:::
14+
15+
# Local testing
16+
17+
::::{tip} On local testing
18+
:class: dropdown
19+
20+
21+
1. get test source content in `folderA`
22+
* myst start --execute --headless
23+
* content server running on `localhost:3100`
24+
2. start myst-theme e.g. `npm run theme:book`
25+
* theme running on `localhost:3000`
26+
3. get second set of test content in `folderB`
27+
* add `local: http://localhost:3000` to `myst.yml#project.references`
28+
* add external cross references and embeds in `folderB` pointing to the local content in `folderA`
29+
* `myst start --execute --headless`
30+
* content server running on `localhost:3101`
31+
4. in a second `myst-theme` folder, or without fully restarting the theme from step 2
32+
* add a `.env` file to `themes/book`
33+
* add `CONTENT_CDN_PORT=3101`
34+
* `npm run theme:book`
35+
* theme running on `localhost:3001`
36+
* test this website 👆
37+
38+
::::
39+
40+
## A local embed (shorthand)
41+
42+
![](xref:local#out:simple-matplotlib)
43+
44+
## a local embed
45+
46+
:::{embed} xref:local#out:simple-matplotlib
47+
:::
48+
49+
## cross references
50+
51+
* [To a notebook cell](xref:local#out:simple-matplotlib)
52+
* [To a figure](xref:local#fig:simple-matplotlib)

myst.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ project:
55
title: Jupyter Outputs
66
references:
77
guide: https://mystmd.org/guide
8+
# local: http://localhost:3000
89
toc:
910
- file: content/summary.md
1011
- file: content/testing.md

0 commit comments

Comments
 (0)