@slidev/cli 52.11.3 → 52.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-CBdhBv4d.mjs → build-DnSiH_hX.mjs} +1 -1
- package/dist/cli.mjs +3 -6
- package/dist/index.mjs +2 -2
- package/dist/{serve-jpCd8QH_.mjs → serve-imvXJyRN.mjs} +1 -1
- package/dist/{shared-Ba3UGXDn.mjs → shared-DHY1ulq4.mjs} +1 -1
- package/package.json +17 -16
- package/skills/GENERATION.md +227 -0
- package/skills/slidev/README.md +61 -0
- package/skills/slidev/SKILL.md +183 -0
- package/skills/slidev/references/animation-click-marker.md +37 -0
- package/skills/slidev/references/animation-drawing.md +68 -0
- package/skills/slidev/references/animation-rough-marker.md +53 -0
- package/skills/slidev/references/api-slide-hooks.md +37 -0
- package/skills/slidev/references/build-og-image.md +36 -0
- package/skills/slidev/references/build-pdf.md +40 -0
- package/skills/slidev/references/build-remote-assets.md +34 -0
- package/skills/slidev/references/build-seo-meta.md +43 -0
- package/skills/slidev/references/code-groups.md +64 -0
- package/skills/slidev/references/code-import-snippet.md +55 -0
- package/skills/slidev/references/code-line-highlighting.md +50 -0
- package/skills/slidev/references/code-line-numbers.md +46 -0
- package/skills/slidev/references/code-magic-move.md +57 -0
- package/skills/slidev/references/code-max-height.md +37 -0
- package/skills/slidev/references/code-twoslash.md +42 -0
- package/skills/slidev/references/core-animations.md +196 -0
- package/skills/slidev/references/core-cli.md +140 -0
- package/skills/slidev/references/core-components.md +197 -0
- package/skills/slidev/references/core-exporting.md +148 -0
- package/skills/slidev/references/core-frontmatter.md +195 -0
- package/skills/slidev/references/core-global-context.md +155 -0
- package/skills/slidev/references/core-headmatter.md +188 -0
- package/skills/slidev/references/core-hosting.md +152 -0
- package/skills/slidev/references/core-layouts.md +286 -0
- package/skills/slidev/references/core-syntax.md +155 -0
- package/skills/slidev/references/diagram-latex.md +55 -0
- package/skills/slidev/references/diagram-mermaid.md +44 -0
- package/skills/slidev/references/diagram-plantuml.md +45 -0
- package/skills/slidev/references/editor-monaco-run.md +44 -0
- package/skills/slidev/references/editor-monaco-write.md +24 -0
- package/skills/slidev/references/editor-monaco.md +50 -0
- package/skills/slidev/references/editor-prettier.md +40 -0
- package/skills/slidev/references/editor-side.md +23 -0
- package/skills/slidev/references/editor-vscode.md +55 -0
- package/skills/slidev/references/layout-canvas-size.md +25 -0
- package/skills/slidev/references/layout-draggable.md +57 -0
- package/skills/slidev/references/layout-global-layers.md +50 -0
- package/skills/slidev/references/layout-slots.md +75 -0
- package/skills/slidev/references/layout-transform.md +33 -0
- package/skills/slidev/references/layout-zoom.md +39 -0
- package/skills/slidev/references/presenter-notes-ruby.md +35 -0
- package/skills/slidev/references/presenter-recording.md +30 -0
- package/skills/slidev/references/presenter-remote.md +40 -0
- package/skills/slidev/references/presenter-timer.md +34 -0
- package/skills/slidev/references/style-direction.md +34 -0
- package/skills/slidev/references/style-icons.md +46 -0
- package/skills/slidev/references/style-scoped.md +50 -0
- package/skills/slidev/references/syntax-block-frontmatter.md +39 -0
- package/skills/slidev/references/syntax-frontmatter-merging.md +49 -0
- package/skills/slidev/references/syntax-importing-slides.md +60 -0
- package/skills/slidev/references/syntax-mdc.md +51 -0
- package/skills/slidev/references/tool-eject-theme.md +27 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: animations
|
|
3
|
+
description: Click animations, motion effects, and slide transitions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Animations
|
|
7
|
+
|
|
8
|
+
Click animations, motion effects, and slide transitions.
|
|
9
|
+
|
|
10
|
+
## Click Animations
|
|
11
|
+
|
|
12
|
+
### v-click Directive
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
<div v-click>Appears on click</div>
|
|
16
|
+
<div v-click>Appears on next click</div>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### v-clicks Component
|
|
20
|
+
|
|
21
|
+
Animate list items:
|
|
22
|
+
|
|
23
|
+
```md
|
|
24
|
+
<v-clicks>
|
|
25
|
+
|
|
26
|
+
- Item 1
|
|
27
|
+
- Item 2
|
|
28
|
+
- Item 3
|
|
29
|
+
|
|
30
|
+
</v-clicks>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
With depth for nested lists:
|
|
34
|
+
|
|
35
|
+
```md
|
|
36
|
+
<v-clicks depth="2">
|
|
37
|
+
|
|
38
|
+
- Parent 1
|
|
39
|
+
- Child 1
|
|
40
|
+
- Child 2
|
|
41
|
+
- Parent 2
|
|
42
|
+
|
|
43
|
+
</v-clicks>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Click Positioning
|
|
47
|
+
|
|
48
|
+
Relative positioning:
|
|
49
|
+
```md
|
|
50
|
+
<div v-click>1st (default)</div>
|
|
51
|
+
<div v-click="+1">2nd</div>
|
|
52
|
+
<div v-click="-1">Same as previous</div>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Absolute positioning:
|
|
56
|
+
```md
|
|
57
|
+
<div v-click="3">Appears on click 3</div>
|
|
58
|
+
<div v-click="[2,5]">Visible clicks 2-5</div>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### v-after
|
|
62
|
+
|
|
63
|
+
Show with previous element:
|
|
64
|
+
|
|
65
|
+
```md
|
|
66
|
+
<div v-click>Main element</div>
|
|
67
|
+
<div v-after>Appears with main element</div>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### v-switch
|
|
71
|
+
|
|
72
|
+
Conditional rendering by click:
|
|
73
|
+
|
|
74
|
+
```md
|
|
75
|
+
<v-switch>
|
|
76
|
+
<template #1>First state</template>
|
|
77
|
+
<template #2>Second state</template>
|
|
78
|
+
<template #3>Third state</template>
|
|
79
|
+
</v-switch>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Custom Click Count
|
|
83
|
+
|
|
84
|
+
```md
|
|
85
|
+
---
|
|
86
|
+
clicks: 10
|
|
87
|
+
---
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Or starting from specific count:
|
|
91
|
+
|
|
92
|
+
```md
|
|
93
|
+
---
|
|
94
|
+
clicksStart: 5
|
|
95
|
+
---
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Motion Animations
|
|
99
|
+
|
|
100
|
+
Using @vueuse/motion:
|
|
101
|
+
|
|
102
|
+
```md
|
|
103
|
+
<div
|
|
104
|
+
v-motion
|
|
105
|
+
:initial="{ x: -100, opacity: 0 }"
|
|
106
|
+
:enter="{ x: 0, opacity: 1 }"
|
|
107
|
+
>
|
|
108
|
+
Animated content
|
|
109
|
+
</div>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Click-based motion:
|
|
113
|
+
|
|
114
|
+
```md
|
|
115
|
+
<div
|
|
116
|
+
v-motion
|
|
117
|
+
:initial="{ scale: 1 }"
|
|
118
|
+
:click-1="{ scale: 1.5 }"
|
|
119
|
+
:click-2="{ scale: 1 }"
|
|
120
|
+
>
|
|
121
|
+
Scales on clicks
|
|
122
|
+
</div>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Slide Transitions
|
|
126
|
+
|
|
127
|
+
In headmatter (all slides):
|
|
128
|
+
|
|
129
|
+
```md
|
|
130
|
+
---
|
|
131
|
+
transition: slide-left
|
|
132
|
+
---
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Per-slide:
|
|
136
|
+
|
|
137
|
+
```md
|
|
138
|
+
---
|
|
139
|
+
transition: fade
|
|
140
|
+
---
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Built-in Transitions
|
|
144
|
+
|
|
145
|
+
- `fade` / `fade-out`
|
|
146
|
+
- `slide-left` / `slide-right`
|
|
147
|
+
- `slide-up` / `slide-down`
|
|
148
|
+
- `view-transition` (View Transitions API)
|
|
149
|
+
|
|
150
|
+
### Directional Transitions
|
|
151
|
+
|
|
152
|
+
Different transitions for forward/backward:
|
|
153
|
+
|
|
154
|
+
```md
|
|
155
|
+
---
|
|
156
|
+
transition: slide-left | slide-right
|
|
157
|
+
---
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Custom Transitions
|
|
161
|
+
|
|
162
|
+
Define CSS classes:
|
|
163
|
+
|
|
164
|
+
```css
|
|
165
|
+
.my-transition-enter-active,
|
|
166
|
+
.my-transition-leave-active {
|
|
167
|
+
transition: all 0.5s ease;
|
|
168
|
+
}
|
|
169
|
+
.my-transition-enter-from,
|
|
170
|
+
.my-transition-leave-to {
|
|
171
|
+
opacity: 0;
|
|
172
|
+
transform: translateX(100px);
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Use: `transition: my-transition`
|
|
177
|
+
|
|
178
|
+
## CSS Classes
|
|
179
|
+
|
|
180
|
+
Animation targets get these classes:
|
|
181
|
+
- `.slidev-vclick-target` - Animated element
|
|
182
|
+
- `.slidev-vclick-hidden` - Hidden state
|
|
183
|
+
- `.slidev-vclick-current` - Current click target
|
|
184
|
+
- `.slidev-vclick-prior` - Previously shown
|
|
185
|
+
|
|
186
|
+
## Default Animation CSS
|
|
187
|
+
|
|
188
|
+
```css
|
|
189
|
+
.slidev-vclick-target {
|
|
190
|
+
transition: opacity 100ms ease;
|
|
191
|
+
}
|
|
192
|
+
.slidev-vclick-hidden {
|
|
193
|
+
opacity: 0;
|
|
194
|
+
pointer-events: none;
|
|
195
|
+
}
|
|
196
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli
|
|
3
|
+
description: Slidev command-line interface reference
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CLI Commands
|
|
7
|
+
|
|
8
|
+
Slidev command-line interface reference.
|
|
9
|
+
|
|
10
|
+
## Dev Server
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
slidev [entry]
|
|
14
|
+
slidev slides.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
| Option | Default | Description |
|
|
19
|
+
|--------|---------|-------------|
|
|
20
|
+
| `--port` | 3030 | Server port |
|
|
21
|
+
| `--open` | false | Open browser |
|
|
22
|
+
| `--remote [password]` | - | Enable remote access |
|
|
23
|
+
| `--bind` | 0.0.0.0 | Bind address |
|
|
24
|
+
| `--base` | / | Base URL path |
|
|
25
|
+
| `--log` | warn | Log level |
|
|
26
|
+
| `--force` | false | Force optimizer re-bundle |
|
|
27
|
+
| `--theme` | - | Override theme |
|
|
28
|
+
|
|
29
|
+
Examples:
|
|
30
|
+
```bash
|
|
31
|
+
slidev --port 8080 --open
|
|
32
|
+
slidev --remote mypassword
|
|
33
|
+
slidev --base /talks/my-talk/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Build
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
slidev build [entry]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Options:
|
|
43
|
+
| Option | Default | Description |
|
|
44
|
+
|--------|---------|-------------|
|
|
45
|
+
| `--out` | dist | Output directory |
|
|
46
|
+
| `--base` | / | Base URL for deployment |
|
|
47
|
+
| `--download` | false | Include PDF download |
|
|
48
|
+
| `--theme` | - | Override theme |
|
|
49
|
+
| `--without-notes` | false | Exclude presenter notes |
|
|
50
|
+
|
|
51
|
+
Examples:
|
|
52
|
+
```bash
|
|
53
|
+
slidev build --base /my-repo/
|
|
54
|
+
slidev build --download --out public
|
|
55
|
+
slidev build slides1.md slides2.md # Multiple builds
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Export
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
slidev export [entry]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Options:
|
|
65
|
+
| Option | Default | Description |
|
|
66
|
+
|--------|---------|-------------|
|
|
67
|
+
| `--output` | - | Output filename |
|
|
68
|
+
| `--format` | pdf | pdf / png / pptx / md |
|
|
69
|
+
| `--timeout` | 30000 | Timeout per slide (ms) |
|
|
70
|
+
| `--range` | - | Slide range (e.g., 1,4-7) |
|
|
71
|
+
| `--dark` | false | Export dark mode |
|
|
72
|
+
| `--with-clicks` | false | Include click steps |
|
|
73
|
+
| `--with-toc` | false | PDF table of contents |
|
|
74
|
+
| `--wait` | 0 | Wait ms before export |
|
|
75
|
+
| `--wait-until` | networkidle | Wait condition |
|
|
76
|
+
| `--omit-background` | false | Transparent background |
|
|
77
|
+
| `--executable-path` | - | Browser path |
|
|
78
|
+
|
|
79
|
+
Examples:
|
|
80
|
+
```bash
|
|
81
|
+
slidev export
|
|
82
|
+
slidev export --format pptx
|
|
83
|
+
slidev export --format png --range 1-5
|
|
84
|
+
slidev export --with-clicks --dark
|
|
85
|
+
slidev export --timeout 60000 --wait 2000
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Format
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
slidev format [entry]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Formats the slides markdown file.
|
|
95
|
+
|
|
96
|
+
## Theme Eject
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
slidev theme eject [entry]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Options:
|
|
103
|
+
| Option | Default | Description |
|
|
104
|
+
|--------|---------|-------------|
|
|
105
|
+
| `--dir` | theme | Output directory |
|
|
106
|
+
| `--theme` | - | Theme to eject |
|
|
107
|
+
|
|
108
|
+
Extracts theme to local directory for customization.
|
|
109
|
+
|
|
110
|
+
## npm Script Usage
|
|
111
|
+
|
|
112
|
+
In package.json:
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"scripts": {
|
|
116
|
+
"dev": "slidev",
|
|
117
|
+
"build": "slidev build",
|
|
118
|
+
"export": "slidev export"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
With arguments (note `--`):
|
|
124
|
+
```bash
|
|
125
|
+
npm run dev -- --port 8080 --open
|
|
126
|
+
npm run export -- --format pptx
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Boolean Options
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
slidev --open # Same as --open true
|
|
133
|
+
slidev --no-open # Same as --open false
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Install CLI Globally
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm i -g @slidev/cli
|
|
140
|
+
```
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: components
|
|
3
|
+
description: Ready-to-use components in Slidev
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Built-in Components
|
|
7
|
+
|
|
8
|
+
Ready-to-use components in Slidev.
|
|
9
|
+
|
|
10
|
+
## Navigation
|
|
11
|
+
|
|
12
|
+
### Link
|
|
13
|
+
|
|
14
|
+
Navigate to slide:
|
|
15
|
+
```md
|
|
16
|
+
<Link to="5">Go to slide 5</Link>
|
|
17
|
+
<Link to="intro">Go to intro</Link> <!-- with routeAlias -->
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### SlideCurrentNo / SlidesTotal
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
Slide <SlideCurrentNo /> of <SlidesTotal />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Toc (Table of Contents)
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
<Toc />
|
|
30
|
+
<Toc maxDepth="2" />
|
|
31
|
+
<Toc columns="2" />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Props:
|
|
35
|
+
- `columns` - Number of columns
|
|
36
|
+
- `maxDepth` / `minDepth` - Heading depth filter
|
|
37
|
+
- `mode` - 'all' | 'onlyCurrentTree' | 'onlySiblings'
|
|
38
|
+
|
|
39
|
+
### TitleRenderer
|
|
40
|
+
|
|
41
|
+
Render slide title:
|
|
42
|
+
```md
|
|
43
|
+
<TitleRenderer no="3" />
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Animations
|
|
47
|
+
|
|
48
|
+
### VClick / VClicks
|
|
49
|
+
|
|
50
|
+
```md
|
|
51
|
+
<VClick>Shows on click</VClick>
|
|
52
|
+
|
|
53
|
+
<VClicks>
|
|
54
|
+
|
|
55
|
+
- Item 1
|
|
56
|
+
- Item 2
|
|
57
|
+
|
|
58
|
+
</VClicks>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### VAfter
|
|
62
|
+
|
|
63
|
+
```md
|
|
64
|
+
<VClick>First</VClick>
|
|
65
|
+
<VAfter>Shows with first</VAfter>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### VSwitch
|
|
69
|
+
|
|
70
|
+
```md
|
|
71
|
+
<VSwitch>
|
|
72
|
+
<template #1>State 1</template>
|
|
73
|
+
<template #2>State 2</template>
|
|
74
|
+
</VSwitch>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Drawing
|
|
78
|
+
|
|
79
|
+
### Arrow
|
|
80
|
+
|
|
81
|
+
```md
|
|
82
|
+
<Arrow x1="10" y1="10" x2="100" y2="100" />
|
|
83
|
+
<Arrow x1="10" y1="10" x2="100" y2="100" two-way />
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Props: `x1`, `y1`, `x2`, `y2`, `width`, `color`, `two-way`
|
|
87
|
+
|
|
88
|
+
### VDragArrow
|
|
89
|
+
|
|
90
|
+
Draggable arrow:
|
|
91
|
+
```md
|
|
92
|
+
<VDragArrow />
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Layout
|
|
96
|
+
|
|
97
|
+
### Transform
|
|
98
|
+
|
|
99
|
+
Scale elements:
|
|
100
|
+
```md
|
|
101
|
+
<Transform :scale="0.5">
|
|
102
|
+
<LargeContent />
|
|
103
|
+
</Transform>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Props: `scale`, `origin`
|
|
107
|
+
|
|
108
|
+
### AutoFitText
|
|
109
|
+
|
|
110
|
+
Auto-sizing text:
|
|
111
|
+
```md
|
|
112
|
+
<AutoFitText :max="200" :min="50" modelValue="Hello" />
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Media
|
|
116
|
+
|
|
117
|
+
### SlidevVideo
|
|
118
|
+
|
|
119
|
+
```md
|
|
120
|
+
<SlidevVideo v-click autoplay controls>
|
|
121
|
+
<source src="/video.mp4" type="video/mp4" />
|
|
122
|
+
</SlidevVideo>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Props: `controls`, `autoplay`, `autoreset`, `poster`, `timestamp`
|
|
126
|
+
|
|
127
|
+
### Youtube
|
|
128
|
+
|
|
129
|
+
```md
|
|
130
|
+
<Youtube id="dQw4w9WgXcQ" />
|
|
131
|
+
<Youtube id="dQw4w9WgXcQ" width="600" height="400" />
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Tweet
|
|
135
|
+
|
|
136
|
+
```md
|
|
137
|
+
<Tweet id="1423789844234231808" />
|
|
138
|
+
<Tweet id="1423789844234231808" :scale="0.8" />
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Conditional
|
|
142
|
+
|
|
143
|
+
### LightOrDark
|
|
144
|
+
|
|
145
|
+
```md
|
|
146
|
+
<LightOrDark>
|
|
147
|
+
<template #dark>Dark mode content</template>
|
|
148
|
+
<template #light>Light mode content</template>
|
|
149
|
+
</LightOrDark>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### RenderWhen
|
|
153
|
+
|
|
154
|
+
```md
|
|
155
|
+
<RenderWhen context="presenter">
|
|
156
|
+
Only in presenter mode
|
|
157
|
+
</RenderWhen>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Context values:
|
|
161
|
+
- `main` - Main presentation view
|
|
162
|
+
- `visible` - Visible slides
|
|
163
|
+
- `print` - Print/export mode
|
|
164
|
+
- `slide` - Normal slide view
|
|
165
|
+
- `overview` - Overview mode
|
|
166
|
+
- `presenter` - Presenter mode
|
|
167
|
+
- `previewNext` - Next slide preview
|
|
168
|
+
|
|
169
|
+
## Branding
|
|
170
|
+
|
|
171
|
+
### PoweredBySlidev
|
|
172
|
+
|
|
173
|
+
```md
|
|
174
|
+
<PoweredBySlidev />
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Draggable
|
|
178
|
+
|
|
179
|
+
### VDrag
|
|
180
|
+
|
|
181
|
+
```md
|
|
182
|
+
<VDrag pos="myElement">
|
|
183
|
+
Draggable content
|
|
184
|
+
</VDrag>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
See [draggable](draggable.md) for details.
|
|
188
|
+
|
|
189
|
+
## Component Auto-Import
|
|
190
|
+
|
|
191
|
+
Components from these sources are auto-imported:
|
|
192
|
+
1. Built-in components
|
|
193
|
+
2. Theme components
|
|
194
|
+
3. Addon components
|
|
195
|
+
4. `./components/` directory
|
|
196
|
+
|
|
197
|
+
No import statements needed.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: exporting
|
|
3
|
+
description: Export presentations to PDF, PPTX, PNG, or Markdown
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Exporting Slides
|
|
7
|
+
|
|
8
|
+
Export presentations to PDF, PPTX, PNG, or Markdown.
|
|
9
|
+
|
|
10
|
+
## Browser Exporter
|
|
11
|
+
|
|
12
|
+
Access at `http://localhost:3030/export`:
|
|
13
|
+
- Select format and options
|
|
14
|
+
- Preview and download
|
|
15
|
+
|
|
16
|
+
## CLI Export
|
|
17
|
+
|
|
18
|
+
Requires playwright:
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add -D playwright-chromium
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### PDF Export
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
slidev export
|
|
27
|
+
slidev export --output my-slides.pdf
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### PowerPoint Export
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
slidev export --format pptx
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### PNG Export
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
slidev export --format png
|
|
40
|
+
slidev export --format png --range 1-5
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Markdown Export
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
slidev export --format md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Export Options
|
|
50
|
+
|
|
51
|
+
### With Click Steps
|
|
52
|
+
|
|
53
|
+
Export each click as separate page:
|
|
54
|
+
```bash
|
|
55
|
+
slidev export --with-clicks
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Dark Mode
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
slidev export --dark
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Slide Range
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
slidev export --range 1,4-7,10
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Table of Contents
|
|
71
|
+
|
|
72
|
+
PDF with clickable outline:
|
|
73
|
+
```bash
|
|
74
|
+
slidev export --with-toc
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Timeout
|
|
78
|
+
|
|
79
|
+
For slow-rendering slides:
|
|
80
|
+
```bash
|
|
81
|
+
slidev export --timeout 60000
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Wait
|
|
85
|
+
|
|
86
|
+
Wait before capture:
|
|
87
|
+
```bash
|
|
88
|
+
slidev export --wait 2000
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Wait Until
|
|
92
|
+
|
|
93
|
+
Wait condition:
|
|
94
|
+
```bash
|
|
95
|
+
slidev export --wait-until networkidle # Default
|
|
96
|
+
slidev export --wait-until domcontentloaded
|
|
97
|
+
slidev export --wait-until load
|
|
98
|
+
slidev export --wait-until none
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Transparent Background
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
slidev export --omit-background
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Custom Browser
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
slidev export --executable-path /path/to/chrome
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Headmatter Options
|
|
114
|
+
|
|
115
|
+
```yaml
|
|
116
|
+
---
|
|
117
|
+
exportFilename: my-presentation
|
|
118
|
+
download: true # Add download button in build
|
|
119
|
+
export:
|
|
120
|
+
format: pdf
|
|
121
|
+
timeout: 30000
|
|
122
|
+
withClicks: false
|
|
123
|
+
---
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Troubleshooting
|
|
127
|
+
|
|
128
|
+
### Missing Content
|
|
129
|
+
|
|
130
|
+
Increase wait time:
|
|
131
|
+
```bash
|
|
132
|
+
slidev export --wait 3000 --timeout 60000
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Wrong Global Layer State
|
|
136
|
+
|
|
137
|
+
Use `--per-slide` or use `slide-top.vue` instead of `global-top.vue`.
|
|
138
|
+
|
|
139
|
+
### Broken Emojis
|
|
140
|
+
|
|
141
|
+
Use system fonts or install emoji font on server.
|
|
142
|
+
|
|
143
|
+
### CI/CD Export
|
|
144
|
+
|
|
145
|
+
Install playwright browsers:
|
|
146
|
+
```bash
|
|
147
|
+
npx playwright install chromium
|
|
148
|
+
```
|