slidev-addon-agent 0.0.1
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/LICENSE +21 -0
- package/README.md +54 -0
- package/agent/constants.ts +119 -0
- package/agent/deck-context.ts +67 -0
- package/agent/index.ts +201 -0
- package/agent/middleware.ts +163 -0
- package/agent/skills/slidev/README.md +61 -0
- package/agent/skills/slidev/SKILL.md +189 -0
- package/agent/skills/slidev/references/animation-click-marker.md +37 -0
- package/agent/skills/slidev/references/animation-drawing.md +68 -0
- package/agent/skills/slidev/references/animation-rough-marker.md +53 -0
- package/agent/skills/slidev/references/api-slide-hooks.md +37 -0
- package/agent/skills/slidev/references/build-og-image.md +36 -0
- package/agent/skills/slidev/references/build-pdf.md +40 -0
- package/agent/skills/slidev/references/build-remote-assets.md +34 -0
- package/agent/skills/slidev/references/build-seo-meta.md +43 -0
- package/agent/skills/slidev/references/code-groups.md +64 -0
- package/agent/skills/slidev/references/code-import-snippet.md +55 -0
- package/agent/skills/slidev/references/code-line-highlighting.md +50 -0
- package/agent/skills/slidev/references/code-line-numbers.md +46 -0
- package/agent/skills/slidev/references/code-magic-move.md +57 -0
- package/agent/skills/slidev/references/code-max-height.md +37 -0
- package/agent/skills/slidev/references/code-twoslash.md +42 -0
- package/agent/skills/slidev/references/core-animations.md +196 -0
- package/agent/skills/slidev/references/core-cli.md +140 -0
- package/agent/skills/slidev/references/core-components.md +197 -0
- package/agent/skills/slidev/references/core-exporting.md +148 -0
- package/agent/skills/slidev/references/core-frontmatter.md +195 -0
- package/agent/skills/slidev/references/core-global-context.md +155 -0
- package/agent/skills/slidev/references/core-headmatter.md +188 -0
- package/agent/skills/slidev/references/core-hosting.md +152 -0
- package/agent/skills/slidev/references/core-layouts.md +286 -0
- package/agent/skills/slidev/references/core-syntax.md +155 -0
- package/agent/skills/slidev/references/diagram-latex.md +55 -0
- package/agent/skills/slidev/references/diagram-mermaid.md +44 -0
- package/agent/skills/slidev/references/diagram-plantuml.md +45 -0
- package/agent/skills/slidev/references/editor-monaco-run.md +44 -0
- package/agent/skills/slidev/references/editor-monaco-write.md +24 -0
- package/agent/skills/slidev/references/editor-monaco.md +50 -0
- package/agent/skills/slidev/references/editor-prettier.md +40 -0
- package/agent/skills/slidev/references/editor-side.md +23 -0
- package/agent/skills/slidev/references/editor-vscode.md +55 -0
- package/agent/skills/slidev/references/layout-canvas-size.md +25 -0
- package/agent/skills/slidev/references/layout-draggable.md +57 -0
- package/agent/skills/slidev/references/layout-global-layers.md +50 -0
- package/agent/skills/slidev/references/layout-slots.md +75 -0
- package/agent/skills/slidev/references/layout-transform.md +33 -0
- package/agent/skills/slidev/references/layout-zoom.md +39 -0
- package/agent/skills/slidev/references/presenter-notes-ruby.md +35 -0
- package/agent/skills/slidev/references/presenter-recording.md +30 -0
- package/agent/skills/slidev/references/presenter-remote.md +40 -0
- package/agent/skills/slidev/references/presenter-timer.md +34 -0
- package/agent/skills/slidev/references/style-direction.md +34 -0
- package/agent/skills/slidev/references/style-icons.md +46 -0
- package/agent/skills/slidev/references/style-scoped.md +50 -0
- package/agent/skills/slidev/references/syntax-block-frontmatter.md +39 -0
- package/agent/skills/slidev/references/syntax-frontmatter-merging.md +49 -0
- package/agent/skills/slidev/references/syntax-importing-slides.md +60 -0
- package/agent/skills/slidev/references/syntax-mdc.md +51 -0
- package/agent/skills/slidev/references/tool-eject-theme.md +27 -0
- package/agent/tools/export-tool.ts +216 -0
- package/agent/tools/review-tool.ts +136 -0
- package/app/index.ts +124 -0
- package/components/MessageItem.vue +231 -0
- package/components/SlidevAgentNavButton.vue +48 -0
- package/components/SlidevAgentSidebar.vue +766 -0
- package/components/SubagentCard.vue +184 -0
- package/components/TypingDots.vue +62 -0
- package/dist/agent/constants.js +117 -0
- package/dist/agent/deck-context.js +47 -0
- package/dist/agent/index.js +167 -0
- package/dist/agent/middleware.js +134 -0
- package/dist/agent/slide-preview-tool.js +257 -0
- package/dist/agent/tools/export-tool.js +167 -0
- package/dist/agent/tools/review-tool.js +111 -0
- package/dist/app/index.js +101 -0
- package/dist/bin/slidev-agent.js +155 -0
- package/dist/lib/bridge.js +151 -0
- package/dist/lib/env.js +17 -0
- package/dist/lib/headless-tools.js +10 -0
- package/dist/lib/langgraph-init.js +59 -0
- package/dist/lib/review-tool.js +98 -0
- package/lib/bridge.ts +212 -0
- package/lib/config.ts +79 -0
- package/lib/env.ts +38 -0
- package/lib/headless-tool-impl.ts +26 -0
- package/lib/headless-tools.ts +11 -0
- package/lib/langgraph-init.ts +79 -0
- package/lib/messages.ts +169 -0
- package/lib/render-chat-markdown.ts +19 -0
- package/lib/sidebar.ts +573 -0
- package/lib/state.ts +44 -0
- package/package.json +65 -0
- package/public/deepagents.svg +12 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Slidev Skills for Claude Code
|
|
2
|
+
|
|
3
|
+
Agent skills that help Claude Code understand and work with [Slidev](https://sli.dev) presentations.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx skills add slidevjs/slidev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This will add the Slidev skill to your Claude Code configuration.
|
|
12
|
+
|
|
13
|
+
## What's Included
|
|
14
|
+
|
|
15
|
+
The Slidev skill provides Claude Code with knowledge about:
|
|
16
|
+
|
|
17
|
+
- **Core Syntax** - Markdown syntax, slide separators, frontmatter
|
|
18
|
+
- **Animations** - Click animations, transitions, motion effects
|
|
19
|
+
- **Code Features** - Line highlighting, Monaco editor, code groups, magic-move
|
|
20
|
+
- **Diagrams** - Mermaid, PlantUML, LaTeX math
|
|
21
|
+
- **Layouts** - Built-in layouts, slots, global layers
|
|
22
|
+
- **Presenter Mode** - Recording, timer, remote access
|
|
23
|
+
- **Exporting** - PDF, PPTX, PNG, SPA hosting
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
Once installed, Claude Code will automatically use Slidev knowledge when:
|
|
28
|
+
|
|
29
|
+
- Creating new presentations
|
|
30
|
+
- Adding slides with code examples
|
|
31
|
+
- Setting up animations and transitions
|
|
32
|
+
- Configuring themes and layouts
|
|
33
|
+
- Exporting presentations
|
|
34
|
+
|
|
35
|
+
### Example Prompts
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Create a Slidev presentation about TypeScript generics with code examples
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Add a two-column slide with code on the left and explanation on the right
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Set up click animations to reveal bullet points one by one
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Configure the presentation for PDF export with speaker notes
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Documentation
|
|
54
|
+
|
|
55
|
+
- [Slidev Documentation](https://sli.dev)
|
|
56
|
+
- [Theme Gallery](https://sli.dev/resources/theme-gallery)
|
|
57
|
+
- [Showcases](https://sli.dev/resources/showcases)
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
MIT
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slidev
|
|
3
|
+
description: Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Slidev - Presentation Slides for Developers
|
|
7
|
+
|
|
8
|
+
Web-based slides maker built on Vite, Vue, and Markdown.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Technical presentations or slidedecks with live code examples
|
|
13
|
+
- Syntax-highlighted code snippets with animations
|
|
14
|
+
- Interactive demos (Monaco editor, runnable code)
|
|
15
|
+
- Mathematical equations (LaTeX) or diagrams (Mermaid, PlantUML)
|
|
16
|
+
- Record presentations with presenter notes
|
|
17
|
+
- Export to PDF, PPTX, or host as SPA
|
|
18
|
+
- Code walkthroughs for developer talks or workshops
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pnpm create slidev # Create project
|
|
24
|
+
pnpm run dev # Start dev server (opens http://localhost:3030)
|
|
25
|
+
pnpm run build # Build static SPA
|
|
26
|
+
pnpm run export # Export to PDF (requires playwright-chromium)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Verify**: After `pnpm run dev`, confirm slides load at `http://localhost:3030`. After `pnpm run export`, check the output PDF exists in the project root.
|
|
30
|
+
|
|
31
|
+
## Basic Syntax
|
|
32
|
+
|
|
33
|
+
```md
|
|
34
|
+
---
|
|
35
|
+
theme: default
|
|
36
|
+
title: My Presentation
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# First Slide
|
|
40
|
+
|
|
41
|
+
Content here
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
# Second Slide
|
|
46
|
+
|
|
47
|
+
More content
|
|
48
|
+
|
|
49
|
+
<!--
|
|
50
|
+
Presenter notes go here
|
|
51
|
+
-->
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `---` separates slides
|
|
55
|
+
- First frontmatter = headmatter (deck config)
|
|
56
|
+
- HTML comments = presenter notes
|
|
57
|
+
|
|
58
|
+
## Core References
|
|
59
|
+
|
|
60
|
+
| Topic | Description | Reference |
|
|
61
|
+
|-------|-------------|-----------|
|
|
62
|
+
| Markdown Syntax | Slide separators, frontmatter, notes, code blocks | [core-syntax](references/core-syntax.md) |
|
|
63
|
+
| Animations | v-click, v-clicks, motion, transitions | [core-animations](references/core-animations.md) |
|
|
64
|
+
| Headmatter | Deck-wide configuration options | [core-headmatter](references/core-headmatter.md) |
|
|
65
|
+
| Frontmatter | Per-slide configuration options | [core-frontmatter](references/core-frontmatter.md) |
|
|
66
|
+
| CLI Commands | Dev, build, export, theme commands | [core-cli](references/core-cli.md) |
|
|
67
|
+
| Components | Built-in Vue components | [core-components](references/core-components.md) |
|
|
68
|
+
| Layouts | Built-in slide layouts | [core-layouts](references/core-layouts.md) |
|
|
69
|
+
| Exporting | PDF, PPTX, PNG export options | [core-exporting](references/core-exporting.md) |
|
|
70
|
+
| Hosting | Build and deploy to various platforms | [core-hosting](references/core-hosting.md) |
|
|
71
|
+
| Global Context | $nav, $slidev, composables API | [core-global-context](references/core-global-context.md) |
|
|
72
|
+
|
|
73
|
+
## Feature Reference
|
|
74
|
+
|
|
75
|
+
### Code & Editor
|
|
76
|
+
|
|
77
|
+
| Feature | Usage | Reference |
|
|
78
|
+
|---------|-------|-----------|
|
|
79
|
+
| Line highlighting | `` ```ts {2,3} `` | [code-line-highlighting](references/code-line-highlighting.md) |
|
|
80
|
+
| Click-based highlighting | `` ```ts {1\|2-3\|all} `` | [code-line-highlighting](references/code-line-highlighting.md) |
|
|
81
|
+
| Line numbers | `lineNumbers: true` or `{lines:true}` | [code-line-numbers](references/code-line-numbers.md) |
|
|
82
|
+
| Scrollable code | `{maxHeight:'100px'}` | [code-max-height](references/code-max-height.md) |
|
|
83
|
+
| Code tabs | `::code-group` (requires `comark: true`) | [code-groups](references/code-groups.md) |
|
|
84
|
+
| Monaco editor | `` ```ts {monaco} `` | [editor-monaco](references/editor-monaco.md) |
|
|
85
|
+
| Run code | `` ```ts {monaco-run} `` | [editor-monaco-run](references/editor-monaco-run.md) |
|
|
86
|
+
| Edit files | `<<< ./file.ts {monaco-write}` | [editor-monaco-write](references/editor-monaco-write.md) |
|
|
87
|
+
| Code animations | `` ````md magic-move `` | [code-magic-move](references/code-magic-move.md) |
|
|
88
|
+
| TypeScript types | `` ```ts twoslash `` | [code-twoslash](references/code-twoslash.md) |
|
|
89
|
+
| Import code | `<<< @/snippets/file.js` | [code-import-snippet](references/code-import-snippet.md) |
|
|
90
|
+
|
|
91
|
+
### Diagrams & Math
|
|
92
|
+
|
|
93
|
+
| Feature | Usage | Reference |
|
|
94
|
+
|---------|-------|-----------|
|
|
95
|
+
| Mermaid diagrams | `` ```mermaid `` | [diagram-mermaid](references/diagram-mermaid.md) |
|
|
96
|
+
| PlantUML diagrams | `` ```plantuml `` | [diagram-plantuml](references/diagram-plantuml.md) |
|
|
97
|
+
| LaTeX math | `$inline$` or `$$block$$` | [diagram-latex](references/diagram-latex.md) |
|
|
98
|
+
|
|
99
|
+
### Layout & Styling
|
|
100
|
+
|
|
101
|
+
| Feature | Usage | Reference |
|
|
102
|
+
|---------|-------|-----------|
|
|
103
|
+
| Canvas size | `canvasWidth`, `aspectRatio` | [layout-canvas-size](references/layout-canvas-size.md) |
|
|
104
|
+
| Zoom slide | `zoom: 0.8` | [layout-zoom](references/layout-zoom.md) |
|
|
105
|
+
| Scale elements | `<Transform :scale="0.5">` | [layout-transform](references/layout-transform.md) |
|
|
106
|
+
| Layout slots | `::right::`, `::default::` | [layout-slots](references/layout-slots.md) |
|
|
107
|
+
| Scoped CSS | `<style>` in slide | [style-scoped](references/style-scoped.md) |
|
|
108
|
+
| Global layers | `global-top.vue`, `global-bottom.vue` | [layout-global-layers](references/layout-global-layers.md) |
|
|
109
|
+
| Draggable elements | `v-drag`, `<v-drag>` | [layout-draggable](references/layout-draggable.md) |
|
|
110
|
+
| Icons | `<mdi-icon-name />` | [style-icons](references/style-icons.md) |
|
|
111
|
+
|
|
112
|
+
### Animation & Interaction
|
|
113
|
+
|
|
114
|
+
| Feature | Usage | Reference |
|
|
115
|
+
|---------|-------|-----------|
|
|
116
|
+
| Click animations | `v-click`, `<v-clicks>` | [core-animations](references/core-animations.md) |
|
|
117
|
+
| Rough markers | `v-mark.underline`, `v-mark.circle` | [animation-rough-marker](references/animation-rough-marker.md) |
|
|
118
|
+
| Drawing mode | Press `C` or config `drawings:` | [animation-drawing](references/animation-drawing.md) |
|
|
119
|
+
| Direction styles | `forward:delay-300` | [style-direction](references/style-direction.md) |
|
|
120
|
+
| Note highlighting | `[click]` in notes | [animation-click-marker](references/animation-click-marker.md) |
|
|
121
|
+
|
|
122
|
+
### Syntax Extensions
|
|
123
|
+
|
|
124
|
+
| Feature | Usage | Reference |
|
|
125
|
+
|---------|-------|-----------|
|
|
126
|
+
| Comark syntax | `comark: true` + `{style="color:red"}` | [syntax-comark](references/syntax-comark.md) |
|
|
127
|
+
| Block frontmatter | `` ```yaml `` instead of `---` | [syntax-block-frontmatter](references/syntax-block-frontmatter.md) |
|
|
128
|
+
| Import slides | `src: ./other.md` | [syntax-importing-slides](references/syntax-importing-slides.md) |
|
|
129
|
+
| Merge frontmatter | Main entry wins | [syntax-frontmatter-merging](references/syntax-frontmatter-merging.md) |
|
|
130
|
+
|
|
131
|
+
### Presenter & Recording
|
|
132
|
+
|
|
133
|
+
| Feature | Usage | Reference |
|
|
134
|
+
|---------|-------|-----------|
|
|
135
|
+
| Recording | Press `G` for camera | [presenter-recording](references/presenter-recording.md) |
|
|
136
|
+
| Timer | `duration: 30min`, `timer: countdown` | [presenter-timer](references/presenter-timer.md) |
|
|
137
|
+
| Remote control | `slidev --remote` | [presenter-remote](references/presenter-remote.md) |
|
|
138
|
+
| Ruby text | `notesAutoRuby:` | [presenter-notes-ruby](references/presenter-notes-ruby.md) |
|
|
139
|
+
|
|
140
|
+
### Export & Build
|
|
141
|
+
|
|
142
|
+
| Feature | Usage | Reference |
|
|
143
|
+
|---------|-------|-----------|
|
|
144
|
+
| Export options | `slidev export` | [core-exporting](references/core-exporting.md) |
|
|
145
|
+
| Build & deploy | `slidev build` | [core-hosting](references/core-hosting.md) |
|
|
146
|
+
| Build with PDF | `download: true` | [build-pdf](references/build-pdf.md) |
|
|
147
|
+
| Cache images | Automatic for remote URLs | [build-remote-assets](references/build-remote-assets.md) |
|
|
148
|
+
| OG image | `seoMeta.ogImage` or `og-image.png` | [build-og-image](references/build-og-image.md) |
|
|
149
|
+
| SEO tags | `seoMeta:` | [build-seo-meta](references/build-seo-meta.md) |
|
|
150
|
+
|
|
151
|
+
**Export prerequisite**: `pnpm add -D playwright-chromium` is required for PDF/PPTX/PNG export. If export fails with a browser error, install this dependency first.
|
|
152
|
+
|
|
153
|
+
### Editor & Tools
|
|
154
|
+
|
|
155
|
+
| Feature | Usage | Reference |
|
|
156
|
+
|---------|-------|-----------|
|
|
157
|
+
| Side editor | Click edit icon | [editor-side](references/editor-side.md) |
|
|
158
|
+
| VS Code extension | Install `antfu.slidev` | [editor-vscode](references/editor-vscode.md) |
|
|
159
|
+
| Prettier | `prettier-plugin-slidev` | [editor-prettier](references/editor-prettier.md) |
|
|
160
|
+
| Eject theme | `slidev theme eject` | [tool-eject-theme](references/tool-eject-theme.md) |
|
|
161
|
+
|
|
162
|
+
### Lifecycle & API
|
|
163
|
+
|
|
164
|
+
| Feature | Usage | Reference |
|
|
165
|
+
|---------|-------|-----------|
|
|
166
|
+
| Slide hooks | `onSlideEnter()`, `onSlideLeave()` | [api-slide-hooks](references/api-slide-hooks.md) |
|
|
167
|
+
| Navigation API | `$nav`, `useNav()` | [core-global-context](references/core-global-context.md) |
|
|
168
|
+
|
|
169
|
+
## Common Layouts
|
|
170
|
+
|
|
171
|
+
| Layout | Purpose |
|
|
172
|
+
|--------|---------|
|
|
173
|
+
| `cover` | Title/cover slide |
|
|
174
|
+
| `center` | Centered content |
|
|
175
|
+
| `default` | Standard slide |
|
|
176
|
+
| `two-cols` | Two columns (use `::right::`) |
|
|
177
|
+
| `two-cols-header` | Header + two columns |
|
|
178
|
+
| `image` / `image-left` / `image-right` | Image layouts |
|
|
179
|
+
| `iframe` / `iframe-left` / `iframe-right` | Embed URLs |
|
|
180
|
+
| `quote` | Quotation |
|
|
181
|
+
| `section` | Section divider |
|
|
182
|
+
| `fact` / `statement` | Data/statement display |
|
|
183
|
+
| `intro` / `end` | Intro/end slides |
|
|
184
|
+
|
|
185
|
+
## Resources
|
|
186
|
+
|
|
187
|
+
- Documentation: https://sli.dev
|
|
188
|
+
- Theme Gallery: https://sli.dev/resources/theme-gallery
|
|
189
|
+
- Showcases: https://sli.dev/resources/showcases
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: click-marker
|
|
3
|
+
description: Highlight and auto-scroll presenter notes based on click progress
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Click Markers
|
|
7
|
+
|
|
8
|
+
Highlight and auto-scroll presenter notes based on click progress.
|
|
9
|
+
|
|
10
|
+
## Syntax
|
|
11
|
+
|
|
12
|
+
Add `[click]` markers in presenter notes:
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
<!--
|
|
16
|
+
Content before the first click
|
|
17
|
+
|
|
18
|
+
[click] This will be highlighted after the first click
|
|
19
|
+
|
|
20
|
+
Also highlighted after the first click
|
|
21
|
+
|
|
22
|
+
- [click] This list element highlights after the second click
|
|
23
|
+
|
|
24
|
+
[click:3] Last click (skip two clicks)
|
|
25
|
+
-->
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
|
|
30
|
+
- Notes between markers highlight in sync with slide progress
|
|
31
|
+
- Auto-scrolls presenter view to active section
|
|
32
|
+
- Use `[click:{n}]` to skip to specific click number
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- Only works in presenter mode
|
|
37
|
+
- Notes must be HTML comments at end of slide
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: drawing
|
|
3
|
+
description: Draw and annotate slides during presentation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Drawing & Annotations
|
|
7
|
+
|
|
8
|
+
Draw and annotate slides during presentation. Powered by drauu.
|
|
9
|
+
|
|
10
|
+
## Enable Drawing
|
|
11
|
+
|
|
12
|
+
Click the pen icon in the navigation bar or press `C`.
|
|
13
|
+
|
|
14
|
+
## Stylus Support
|
|
15
|
+
|
|
16
|
+
Stylus pens (iPad + Apple Pencil) work automatically - draw with pen, navigate with fingers.
|
|
17
|
+
|
|
18
|
+
## Persist Drawings
|
|
19
|
+
|
|
20
|
+
Save drawings as SVGs and include in exports:
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+
---
|
|
24
|
+
drawings:
|
|
25
|
+
persist: true
|
|
26
|
+
---
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Drawings saved to `.slidev/drawings/`.
|
|
30
|
+
|
|
31
|
+
## Disable Drawing
|
|
32
|
+
|
|
33
|
+
Entirely:
|
|
34
|
+
```md
|
|
35
|
+
---
|
|
36
|
+
drawings:
|
|
37
|
+
enabled: false
|
|
38
|
+
---
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Only in development:
|
|
42
|
+
```md
|
|
43
|
+
---
|
|
44
|
+
drawings:
|
|
45
|
+
enabled: dev
|
|
46
|
+
---
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Only in presenter mode:
|
|
50
|
+
```md
|
|
51
|
+
---
|
|
52
|
+
drawings:
|
|
53
|
+
presenterOnly: true
|
|
54
|
+
---
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Sync Settings
|
|
58
|
+
|
|
59
|
+
Disable sync across instances:
|
|
60
|
+
|
|
61
|
+
```md
|
|
62
|
+
---
|
|
63
|
+
drawings:
|
|
64
|
+
syncAll: false
|
|
65
|
+
---
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Only presenter's drawings sync to others.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rough-marker
|
|
3
|
+
description: Hand-drawn style highlighting using Rough Notation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rough Markers
|
|
7
|
+
|
|
8
|
+
Hand-drawn style highlighting using Rough Notation.
|
|
9
|
+
|
|
10
|
+
## v-mark Directive
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<span v-mark>Important text</span>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Marker Types
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<span v-mark.underline>Underlined</span>
|
|
20
|
+
<span v-mark.circle>Circled</span>
|
|
21
|
+
<span v-mark.highlight>Highlighted</span>
|
|
22
|
+
<span v-mark.strike-through>Struck through</span>
|
|
23
|
+
<span v-mark.box>Boxed</span>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Colors
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<span v-mark.red>Red marker</span>
|
|
30
|
+
<span v-mark.blue>Blue marker</span>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Custom color:
|
|
34
|
+
```html
|
|
35
|
+
<span v-mark="{ color: '#234' }">Custom color</span>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Click Timing
|
|
39
|
+
|
|
40
|
+
Works like v-click:
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<span v-mark="5">Appears on click 5</span>
|
|
44
|
+
<span v-mark="'+1'">Next click</span>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Full Options
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<span v-mark="{ at: 5, color: '#234', type: 'circle' }">
|
|
51
|
+
Custom marker
|
|
52
|
+
</span>
|
|
53
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slide-hooks
|
|
3
|
+
description: Lifecycle hooks for slide components
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Slide Hooks
|
|
7
|
+
|
|
8
|
+
Lifecycle hooks for slide components.
|
|
9
|
+
|
|
10
|
+
## Available Hooks
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { onSlideEnter, onSlideLeave, useIsSlideActive } from '@slidev/client'
|
|
14
|
+
|
|
15
|
+
const isActive = useIsSlideActive()
|
|
16
|
+
|
|
17
|
+
onSlideEnter(() => {
|
|
18
|
+
// Called when slide becomes active
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
onSlideLeave(() => {
|
|
22
|
+
// Called when slide becomes inactive
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Important
|
|
27
|
+
|
|
28
|
+
Do NOT use `onMounted` / `onUnmounted` in slides - component instance persists even when slide is inactive.
|
|
29
|
+
|
|
30
|
+
Use `onSlideEnter` and `onSlideLeave` instead.
|
|
31
|
+
|
|
32
|
+
## Use Cases
|
|
33
|
+
|
|
34
|
+
- Start/stop animations
|
|
35
|
+
- Play/pause media
|
|
36
|
+
- Initialize/cleanup resources
|
|
37
|
+
- Track analytics
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: og-image
|
|
3
|
+
description: Configure Open Graph preview image for social sharing
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Open Graph Image
|
|
7
|
+
|
|
8
|
+
Set preview image for social media sharing.
|
|
9
|
+
|
|
10
|
+
## Custom URL
|
|
11
|
+
|
|
12
|
+
```md
|
|
13
|
+
---
|
|
14
|
+
seoMeta:
|
|
15
|
+
ogImage: https://url.to.your.image.png
|
|
16
|
+
---
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Local Image
|
|
20
|
+
|
|
21
|
+
Place `./og-image.png` in project root - Slidev uses it automatically.
|
|
22
|
+
|
|
23
|
+
## Auto-generate
|
|
24
|
+
|
|
25
|
+
Generate from first slide:
|
|
26
|
+
|
|
27
|
+
```md
|
|
28
|
+
---
|
|
29
|
+
seoMeta:
|
|
30
|
+
ogImage: auto
|
|
31
|
+
---
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Uses Playwright to capture first slide. Requires playwright to be installed.
|
|
35
|
+
|
|
36
|
+
Generated image saved as `./og-image.png` - can be committed to repo.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pdf
|
|
3
|
+
description: Include downloadable PDF in SPA build
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate PDF when Building
|
|
7
|
+
|
|
8
|
+
Generate a downloadable PDF alongside your built slides.
|
|
9
|
+
|
|
10
|
+
## Enable in Headmatter
|
|
11
|
+
|
|
12
|
+
```md
|
|
13
|
+
---
|
|
14
|
+
download: true
|
|
15
|
+
---
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
This generates a PDF and adds a download button to the built slides.
|
|
19
|
+
|
|
20
|
+
## Custom PDF URL
|
|
21
|
+
|
|
22
|
+
Skip generation and use an existing PDF:
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
---
|
|
26
|
+
download: 'https://example.com/my-talk.pdf'
|
|
27
|
+
---
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## CLI Option
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
slidev build --download
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Export Options
|
|
37
|
+
|
|
38
|
+
Configure PDF export settings via:
|
|
39
|
+
- CLI: `slidev build --download --with-clicks --timeout 60000`
|
|
40
|
+
- Headmatter: Set `exportFilename`, `withClicks`, etc.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remote-assets
|
|
3
|
+
description: Bundle remote images and assets for offline use
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bundle Remote Assets
|
|
7
|
+
|
|
8
|
+
Remote images are automatically cached on first run for faster loading.
|
|
9
|
+
|
|
10
|
+
## Remote Images
|
|
11
|
+
|
|
12
|
+
```md
|
|
13
|
+

|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Cached automatically by vite-plugin-remote-assets.
|
|
17
|
+
|
|
18
|
+
## Local Images
|
|
19
|
+
|
|
20
|
+
Place in `public/` folder and reference with leading slash:
|
|
21
|
+
|
|
22
|
+
```md
|
|
23
|
+

|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Do NOT use relative paths like `./pic.png`.
|
|
27
|
+
|
|
28
|
+
## Custom Styling
|
|
29
|
+
|
|
30
|
+
Convert to img tag for custom sizes/styles:
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<img src="/pic.png" class="m-40 h-40 rounded shadow" />
|
|
34
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seo-meta
|
|
3
|
+
description: Configure SEO and social media meta tags
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SEO Meta Tags
|
|
7
|
+
|
|
8
|
+
Configure social media and search engine meta tags.
|
|
9
|
+
|
|
10
|
+
## Configuration
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
---
|
|
14
|
+
seoMeta:
|
|
15
|
+
ogTitle: Slidev Starter Template
|
|
16
|
+
ogDescription: Presentation slides for developers
|
|
17
|
+
ogImage: https://cover.sli.dev
|
|
18
|
+
ogUrl: https://example.com
|
|
19
|
+
twitterCard: summary_large_image
|
|
20
|
+
twitterTitle: Slidev Starter Template
|
|
21
|
+
twitterDescription: Presentation slides for developers
|
|
22
|
+
twitterImage: https://cover.sli.dev
|
|
23
|
+
twitterSite: username
|
|
24
|
+
twitterUrl: https://example.com
|
|
25
|
+
---
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Available Options
|
|
29
|
+
|
|
30
|
+
**Open Graph (Facebook, LinkedIn):**
|
|
31
|
+
- `ogTitle` - Title
|
|
32
|
+
- `ogDescription` - Description
|
|
33
|
+
- `ogImage` - Preview image URL
|
|
34
|
+
- `ogUrl` - Canonical URL
|
|
35
|
+
|
|
36
|
+
**Twitter Card:**
|
|
37
|
+
- `twitterCard` - Card type (summary, summary_large_image)
|
|
38
|
+
- `twitterTitle` - Title
|
|
39
|
+
- `twitterDescription` - Description
|
|
40
|
+
- `twitterImage` - Preview image URL
|
|
41
|
+
- `twitterSite` - Twitter username
|
|
42
|
+
|
|
43
|
+
Powered by unhead.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-groups
|
|
3
|
+
description: Group multiple code blocks with tabs and automatic icons
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Groups
|
|
7
|
+
|
|
8
|
+
Group multiple code blocks with tabs and automatic icons.
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
Enable Comark syntax in headmatter:
|
|
13
|
+
|
|
14
|
+
```md
|
|
15
|
+
---
|
|
16
|
+
comark: true
|
|
17
|
+
---
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Syntax
|
|
21
|
+
|
|
22
|
+
````md
|
|
23
|
+
::code-group
|
|
24
|
+
|
|
25
|
+
```sh [npm]
|
|
26
|
+
npm i @slidev/cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```sh [yarn]
|
|
30
|
+
yarn add @slidev/cli
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```sh [pnpm]
|
|
34
|
+
pnpm add @slidev/cli
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
::
|
|
38
|
+
````
|
|
39
|
+
|
|
40
|
+
## Title Icon Matching
|
|
41
|
+
|
|
42
|
+
Icons auto-match by title name. Install `@iconify-json/vscode-icons` for built-in icons.
|
|
43
|
+
|
|
44
|
+
Supported: npm, yarn, pnpm, bun, deno, vue, react, typescript, javascript, and many more.
|
|
45
|
+
|
|
46
|
+
## Custom Icons
|
|
47
|
+
|
|
48
|
+
Use `~icon~` syntax in title:
|
|
49
|
+
|
|
50
|
+
````md
|
|
51
|
+
```js [npm ~i-uil:github~]
|
|
52
|
+
console.log('Hello!')
|
|
53
|
+
```
|
|
54
|
+
````
|
|
55
|
+
|
|
56
|
+
Requires:
|
|
57
|
+
1. Install icon collection: `pnpm add @iconify-json/uil`
|
|
58
|
+
2. Add to safelist in `uno.config.ts`:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
export default defineConfig({
|
|
62
|
+
safelist: ['i-uil:github']
|
|
63
|
+
})
|
|
64
|
+
```
|