Skip to content

Commit e9f2f0e

Browse files
authored
docs: add documentation for mo.outline widget (#6468)
1 parent c78866c commit e9f2f0e

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

docs/api/layouts/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ them but just render their children in a certain way.
1818
| [`marimo.lazy`][marimo.lazy] | Lazy load content |
1919
| [`marimo.left`][marimo.left] | Left-align content |
2020
| [`marimo.nav_menu`][marimo.nav_menu] | Create navigation menus |
21+
| [`marimo.outline`][marimo.outline] | Display table of contents outline |
2122
| [`marimo.plain`][marimo.plain] | Display content without styling |
2223
| [`marimo.right`][marimo.right] | Right-align content |
2324
| [`marimo.routes`][marimo.routes] | Create page routing |

docs/api/layouts/outline.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Outline
2+
3+
/// marimo-embed
4+
5+
```python
6+
@app.cell
7+
def __():
8+
mo.md("# Header 1")
9+
return
10+
11+
@app.cell
12+
def __():
13+
mo.md("## Header 2")
14+
return
15+
16+
@app.cell
17+
def __():
18+
mo.outline(label="Table of Contents")
19+
return
20+
```
21+
22+
///
23+
24+
::: marimo.outline

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ nav:
232232
- Json: api/layouts/json.md
233233
- Justify: api/layouts/justify.md
234234
- Lazy: api/layouts/lazy.md
235+
- Outline: api/layouts/outline.md
235236
- Plain: api/layouts/plain.md
236237
- Routes: api/layouts/routes.md
237238
- Sidebar: api/layouts/sidebar.md

0 commit comments

Comments
 (0)