Skip to content

Commit a431d66

Browse files
committed
docs: Update thumbnail documentation for latest CLI
There was a refactor where `marimo tools thumbnails generate` was replaced with `marimo export thumbnail`. The documentation still showed outdated example commands. I also found a missing ``` which broke a lot of the page. Fixed that as well.
1 parent 2dfb689 commit a431d66

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

docs/guides/publishing/opengraph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ __marimo__/assets/<notebook_stem>/opengraph.png
4646
To generate these thumbnails, use:
4747

4848
```bash
49-
marimo tools thumbnails generate notebook.py
50-
marimo tools thumbnails generate folder/
49+
marimo export thumbnail notebook.py
50+
marimo export thumbnail folder/
5151
```
5252

5353
For execution and sandbox options (and for Playwright installation instructions), see [Thumbnails](thumbnails.md).

docs/guides/publishing/thumbnails.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
Generate screenshot-based thumbnail images for notebooks, used by [OpenGraph previews](opengraph.md) and cards in [gallery mode](../apps.md#gallery-mode).
44

55
```bash
6-
marimo export thumbnail generate notebook.py
6+
marimo export thumbnail notebook.py
7+
```
78

89
## Output location
910

@@ -31,13 +32,13 @@ This is the default OpenGraph thumbnail path used by [OpenGraph previews](opengr
3132
You can generate a thumbnail for a single notebook:
3233

3334
```bash
34-
marimo tools thumbnails generate notebook.py
35+
marimo export thumbnail notebook.py
3536
```
3637

3738
Or generate thumbnails for all notebooks in a directory:
3839

3940
```bash
40-
marimo tools thumbnails generate folder/
41+
marimo export thumbnail folder/
4142
```
4243

4344
When you pass a directory, marimo scans it for marimo notebooks and skips non-notebook files (for example `README.md`).
@@ -49,19 +50,19 @@ By default, thumbnails are generated without executing the notebook (fast; no ou
4950
=== "No execution (default)"
5051

5152
```bash
52-
marimo tools thumbnails generate notebook.py
53+
marimo export thumbnail notebook.py
5354
```
5455

5556
=== "Execute notebook"
5657

5758
```bash
58-
marimo tools thumbnails generate notebook.py --execute
59+
marimo export thumbnail --execute notebook.py
5960
```
6061

6162
=== "Execute in a sandbox"
6263

6364
```bash
64-
marimo tools thumbnails generate notebook.py --execute --sandbox
65+
marimo export thumbnail --execute --sandbox notebook.py
6566
```
6667

6768
!!! note "Requires uv"
@@ -81,13 +82,13 @@ By default, thumbnails are generated without executing the notebook (fast; no ou
8182
If a thumbnail already exists, marimo will skip it by default. To replace existing thumbnails:
8283

8384
```bash
84-
marimo tools thumbnails generate notebook.py --overwrite
85+
marimo export thumbnail --overwrite notebook.py
8586
```
8687

8788
To write a thumbnail to a specific filename, use `--output` (single notebook only):
8889

8990
```bash
90-
marimo tools thumbnails generate notebook.py --output thumbnail.png
91+
marimo export thumbnail --output thumbnail.png notebook.py
9192
```
9293

9394
## Tuning quality
@@ -97,21 +98,21 @@ For OpenGraph previews, the default viewport size is 1200x630. marimo also uses
9798
To increase output resolution, increase `--scale` (max 4):
9899

99100
```bash
100-
marimo tools thumbnails generate notebook.py --scale 3
101+
marimo export thumbnail --scale 3 notebook.py
101102
```
102103

103104
If thumbnails appear blank or partially rendered, increase `--timeout-ms` to wait longer before the screenshot:
104105

105106
```bash
106-
marimo tools thumbnails generate notebook.py --timeout-ms 3000
107+
marimo export thumbnail --timeout-ms 3000 notebook.py
107108
```
108109

109110
## Passing arguments to notebooks
110111

111112
To pass CLI args through to the notebook, separate them with `--`:
112113

113114
```bash
114-
marimo tools thumbnails generate notebook.py -- --foo 123
115+
marimo export thumbnail notebook.py -- --foo 123
115116
```
116117

117118
For more on passing values to notebooks, see [Command Line Arguments](../../api/cli_args.md).

0 commit comments

Comments
 (0)