Skip to content

Commit 6dc33a0

Browse files
committed
docs: improve docs
1 parent cde1cc2 commit 6dc33a0

File tree

5 files changed

+172
-2
lines changed

5 files changed

+172
-2
lines changed

docs/custom/config-monaco.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ monaco: false # can also be `dev` or `build` to conditionally enable it
9393
---
9494
```
9595

96+
## Strict Mode {#strict-mode}
97+
98+
> Available since v0.52.0
99+
100+
By default, Monaco runnable code executes in strict mode (`"use strict"`). You can disable this if your code relies on non-strict mode behavior:
101+
102+
```yaml
103+
---
104+
monacoRunUseStrict: false
105+
---
106+
```
107+
96108
## Configure Code Runners
97109

98110
To configure how the Monaco Runner runs the code, or to add support for custom languages, please reference [Configure Code Runners](/custom/config-code-runners).

docs/features/shiki-magic-move.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,64 @@ const add = () => count += 1
5151
```
5252
````
5353
`````
54+
55+
## Title Bar {#title-bar}
56+
57+
> Available since v0.52.0
58+
59+
You can add a title bar to magic move blocks by specifying a filename in the opening fence of each step:
60+
61+
`````md
62+
````md magic-move
63+
```js [app.js]
64+
console.log('Step 1')
65+
```
66+
```js [app.js]
67+
console.log('Step 2')
68+
```
69+
````
70+
`````
71+
72+
The title bar will also display an automatically matched icon based on the filename (see <LinkInline link="features/code-groups#title-icon-matching" />).
73+
74+
## Animation Duration {#duration}
75+
76+
> Available since v0.52.0
77+
78+
You can customize the animation duration for magic move transitions globally via the headmatter:
79+
80+
```yaml
81+
---
82+
magicMoveDuration: 500 # duration in milliseconds, default is 800
83+
---
84+
```
85+
86+
Or per-block by passing the `duration` option:
87+
88+
`````md
89+
````md magic-move {duration:500}
90+
```js
91+
console.log('Step 1')
92+
```
93+
```js
94+
console.log('Step 2')
95+
```
96+
````
97+
`````
98+
99+
## Copy Button {#copy-button}
100+
101+
> Available since v0.52.0
102+
103+
Magic move code blocks support a copy button that appears on hover. Configure this behavior globally with the `magicMoveCopy` headmatter option:
104+
105+
```yaml
106+
---
107+
# Options: true | false | 'always' | 'final'
108+
magicMoveCopy: true # show copy button on all steps (default)
109+
magicMoveCopy: false # disable copy button
110+
magicMoveCopy: 'final' # only show copy button on the final step
111+
---
112+
```
113+
114+
The copy button respects the global `codeCopy` setting. If `codeCopy` is `false`, the magic move copy button will also be disabled.

docs/features/vscode-extension.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ The VS Code extension provides some features to help you better organize your sl
2828
### Features
2929

3030
- Preview slides in the side panel
31-
- Slides tree view
32-
- Re-ordering slides
31+
- Slides tree view with slide numbers
32+
- Re-ordering slides via drag and drop
3333
- Folding for slide blocks
3434
- Multiple slides project support
3535
- Start the dev server with one click
36+
- AI/Copilot integration via Language Model Tools
3637

3738
![](https://github.com/slidevjs/slidev/assets/63178754/2c9ba01a-d21f-4b33-b6b6-4e249873f865)
3839

@@ -78,3 +79,25 @@ Examples:
7879
- Global installation: `slidev ${args}`
7980
- For PNPM users, you can set it to `pnpm slidev ${args}`.
8081
- For [code-server](https://coder.com/docs/code-server/) users, you can set it to `pnpm slidev ${args} --base /proxy/${port}/`. This will make the dev server accessible at `http://localhost:8080/proxy/3000/`.
82+
83+
#### Slides Tree View {#slides-tree}
84+
85+
> Available since v0.52.0
86+
87+
The slides tree view shows all slides in your presentation with their slide numbers and titles. Each slide is displayed as `{slideNo}. {title}` making it easy to navigate to specific slides.
88+
89+
#### AI/Copilot Integration {#ai-integration}
90+
91+
> Available since v0.52.0
92+
93+
The extension provides Language Model Tools that allow VSCode's Copilot and other AI assistants to interact with your Slidev project. The following tools are available:
94+
95+
- `slidev_getActiveSlide` - Get information about the current active slide and project
96+
- `slidev_getSlideContent` - Retrieve the content of a specific slide by number
97+
- `slidev_getAllSlideTitles` - List all slide titles in the presentation
98+
- `slidev_findSlideNoByTitle` - Find a slide number by its title
99+
- `slidev_listEntries` - List all loaded Slidev project entries
100+
- `slidev_getPreviewPort` - Get the preview server port for a project
101+
- `slidev_chooseEntry` - Switch the active Slidev entry
102+
103+
These tools enable AI assistants to help you navigate, edit, and understand your slides more effectively.

docs/guide/ui.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ Whenever you navigate through the slides in the presenter mode, all other opened
5050

5151
![](/screenshots/presenter-mode.png)
5252

53+
### Presenter Layouts {#presenter-layouts}
54+
55+
> Available since v0.50.0
56+
57+
The presenter view offers three different layouts that you can cycle through by clicking the layout toggle button <carbon-template class="inline-icon-btn"/> in the navigation bar:
58+
59+
- **Layout 1** (default): Current slide prominently displayed at the top, with notes and next slide preview below
60+
- **Layout 2**: Notes panel on the left, current slide and next slide stacked on the right
61+
- **Layout 3**: Notes and current slide on the left, larger next slide preview on the right
62+
63+
Each layout is optimized for different screen sizes and presentation preferences.
64+
65+
### Screen Mirror {#screen-mirror}
66+
67+
> Available since v0.50.0
68+
69+
In the presenter view, you can switch the main slide area to "Screen Mirror" mode. This allows you to capture and display another monitor or window directly in the presenter view.
70+
71+
Click the "Screen Mirror" option in the presenter view's segment control, then select the screen or window you want to mirror. This is useful when you want to see exactly what your audience sees on the projector or external display (e.g. live coding / live demo).
72+
5373
## Slide Overview {#slides-overview}
5474

5575
> Available since v0.48.0
@@ -61,6 +81,16 @@ You can visit an overview of all of your slides by first opening the [Quick Over
6181

6282
The overview page gives you a linear list of all your slides, with all of your notes on the side. You can double-click on the notes to edit the notes directly, and drag the clicks sliders to preview the steps in your slides.
6383

84+
## Notes Editor {#notes-editor}
85+
86+
> Available since v0.52.0
87+
88+
Slidev provides a batch notes editor at `http://localhost:<port>/notes-edit` where you can edit notes for all slides in a single text area.
89+
90+
Notes for each slide are separated by `--- #[slide-number]` markers. Changes are automatically saved as you type with debouncing.
91+
92+
This is useful when you want to write or review all your speaker notes in one place without switching between slides.
93+
6494
## Drawing UI {#drawing}
6595

6696
See:
@@ -79,6 +109,39 @@ See:
79109

80110
<LinkCard link="guide/exporting#browser"/>
81111

112+
## Settings {#settings}
113+
114+
Click the <carbon-settings-adjust class="inline-icon-btn"/> button in the navigation bar to access additional settings.
115+
116+
### CSS Filters {#css-filters}
117+
118+
> Available since v0.50.0
119+
120+
When presenting on different projectors or displays, colors may appear differently than expected. Slidev provides CSS filter controls to adjust the display in real-time:
121+
122+
- **Invert**: Flip all colors
123+
- **Brightness**: Adjust overall brightness (0.5 - 1.5)
124+
- **Contrast**: Adjust contrast levels (0.5 - 1.5)
125+
- **Saturation**: Adjust color saturation (0.5 - 1.5)
126+
- **Sepia**: Add sepia tone effect
127+
- **Hue Rotate**: Shift all colors by degrees (-180 to 180)
128+
129+
These settings are stored locally and persist across sessions. A dot indicator appears on the settings button when any filter is active.
130+
131+
### Hide Idle Cursor {#hide-idle-cursor}
132+
133+
> Available since v0.50.0
134+
135+
When enabled, the cursor will automatically hide after a period of inactivity during the presentation. This provides a cleaner viewing experience for your audience.
136+
137+
### Slide Scale {#slide-scale}
138+
139+
Choose between "Fit" mode (scales slides to fit the viewport) or "1:1" mode (displays slides at their native resolution).
140+
141+
### Wake Lock {#wake-lock}
142+
143+
When enabled, prevents the screen from dimming or locking during your presentation. Requires browser support for the Wake Lock API.
144+
82145
## Global Layers {#global-layers}
83146

84147
You can add any custom UI below or above your slides for the whole presentation or per-slide:

docs/guide/work-with-ai.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,14 @@ The Slidev skill provides knowledge about:
4646
- Diagrams (Mermaid, PlantUML) and LaTeX math
4747
- Built-in layouts and components
4848
- Exporting and hosting options
49+
50+
## VS Code Extension
51+
52+
The <LinkInline link="features/vscode-extension" /> provides Language Model Tools that allow VS Code's Copilot and other AI assistants to interact with your Slidev project directly. These tools enable AI to:
53+
54+
- Get information about the active slide and project
55+
- Retrieve content of specific slides
56+
- List and search slides by title
57+
- Navigate between slides
58+
59+
See <LinkInline link="features/vscode-extension#ai-integration" /> for more details.

0 commit comments

Comments
 (0)