Skip to content

Commit 6565972

Browse files
fonspclaude
andauthored
Rename @pluto block args to pluto_* prefix in docs and examples (#6)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e1a9b38 commit 6565972

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Per-page scoping is a v0.2+ idea.
9696

9797
`PlutoBlock` stores two "resolved" fields set during the builder step:
9898

99-
- For `url=`/`state=` (hosted): resolved fields are the URLs verbatim.
99+
- For `pluto_notebookfile`/`pluto_statefile` (hosted): resolved fields are the URLs verbatim.
100100
- For `notebook=` (local): resolved fields are **build-root-relative paths**
101101
(e.g. `"pluto_notebooks/foo.jl"`), not absolute paths. Domify turns them
102102
into page-relative hrefs via `HTMLWriter.relhref(page_url, target)` where

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Or with a hosted notebook:
3535

3636
````markdown
3737
```@pluto
38-
url = "https://bucket1.pluto.land/n/….jl"
39-
state = "https://bucket1.pluto.land/n/….plutostate"
38+
pluto_notebookfile = "https://bucket1.pluto.land/n/….jl"
39+
pluto_statefile = "https://bucket1.pluto.land/n/….plutostate"
4040
```
4141
````
4242

‎docs/src/demo_url.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
This page embeds a Pluto notebook hosted on `pluto.land`.
44

55
```@pluto
6-
url = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.jl"
7-
state = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.plutostate"
8-
binder = "https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8"
6+
pluto_notebookfile = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.jl"
7+
pluto_statefile = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.plutostate"
8+
pluto_binder_url = "https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8"
99
```
1010

1111
And regular Documenter content still works below the notebook:

‎docs/src/index.md‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,24 @@ If you already host the notebook and state (e.g. via
4444

4545
````markdown
4646
```@pluto
47-
url = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.jl"
48-
state = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.plutostate"
49-
binder = "https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8"
47+
pluto_notebookfile = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.jl"
48+
pluto_statefile = "https://bucket1.pluto.land/n/01JVKXFS45K76H3Y8HY3J158JA.plutostate"
49+
pluto_binder_url = "https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8"
5050
```
5151
````
5252

5353
### Options
5454

55-
| Key | Type | Default | Meaning |
56-
| ------------ | ------- | ------- | --------------------------------------- |
57-
| `notebook` | String | — | Path to a local `.jl` notebook |
58-
| `url` | String | — | URL of a hosted `.jl` notebook |
59-
| `state` | String | — | URL of a hosted `.plutostate` file |
60-
| `binder` | String | — | Optional Binder launch URL |
61-
| `disable_ui` | Bool | `true` | Hide Pluto's UI chrome |
62-
63-
Set exactly one of `notebook` or `url`. If `url` is set, `state` is required.
55+
| Key | Type | Default | Meaning |
56+
| ---------------------------- | ------ | ------- | ---------------------------------------------- |
57+
| `notebook` | String | — | Path to a local `.jl` notebook (relative to `docs/src/`) |
58+
| `pluto_notebookfile` | String | — | URL of a hosted `.jl` notebook |
59+
| `pluto_statefile` | String | — | URL of a hosted `.plutostate` file |
60+
| `pluto_disable_ui` | Bool | `true` | Hide Pluto's UI chrome |
61+
| `pluto_binder_url` | String | — | Binder launch URL for the "Edit" button |
62+
| `pluto_slider_server_url` | String | — | PlutoSliderServer base URL for interactivity |
63+
| `pluto_preamble_html` | String | — | HTML inserted before the notebook |
64+
| `pluto_recording_url` | String | — | URL of a recording to play back |
65+
| `pluto_recording_audio_url` | String | — | URL of the audio track for a recording |
66+
67+
Set exactly one of `notebook` or `pluto_notebookfile`. If `pluto_notebookfile` is set, `pluto_statefile` is also required.

0 commit comments

Comments
 (0)