slidev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSlidev Skill
Slidev Skill
This skill helps create and edit presentation slides using Slidev, a markdown-based presentation framework for developers.
本Skill可帮助你使用Slidev(一款面向开发者的基于Markdown的演示文稿框架)创建和编辑演示幻灯片。
When to Use This Skill
何时使用本Skill
Use this skill when the user asks to:
- Create a new presentation or slide deck
- Edit existing slides
- Add or modify slide content
- Work with Slidev-specific features
- Generate presentations from content
当用户提出以下需求时使用本Skill:
- 创建新的演示文稿或幻灯片组
- 编辑现有幻灯片
- 添加或修改幻灯片内容
- 使用Slidev专属功能
- 根据内容生成演示文稿
Project Structure
项目结构
Slides are located in directory with:
packages/slides/- Slide files: or
*.slides.mdslides.md - Components: directory for Vue components
components/ - Configuration: for dependencies
package.json
幻灯片存储在目录下,包含:
packages/slides/- 幻灯片文件:或
*.slides.mdslides.md - 组件:目录用于存放Vue组件
components/ - 配置:用于管理依赖
package.json
Running Slidev
运行Slidev
Start the development server:
bash
pnpm run slides [filename]The dev server runs on by default.
http://localhost:3030启动开发服务器:
bash
pnpm run slides [filename]开发服务器默认运行在。
http://localhost:3030Slidev File Format
Slidev文件格式
Frontmatter Configuration
Frontmatter配置
Every Slidev file starts with YAML frontmatter:
yaml
---
theme: seriph # or 'default'
title: Your Presentation Title
info: |
## Presentation description
Additional info here
class: text-center
drawings:
persist: false
transition: slide-left # fade-out, slide-up, etc.
mdc: true
duration: 10min
---每个Slidev文件都以YAML Frontmatter开头:
yaml
---
theme: seriph # 或 'default'
title: Your Presentation Title
info: |
## Presentation description
Additional info here
class: text-center
drawings:
persist: false
transition: slide-left # fade-out, slide-up, etc.
mdc: true
duration: 10min
---Slide Separators
幻灯片分隔符
Slides are separated by :
---markdown
---幻灯片通过分隔:
---markdown
---Slide 1
Slide 1
Content here
Content here
Slide 2
Slide 2
More content
undefinedMore content
undefinedSlide Configuration
单张幻灯片配置
Individual slides can have frontmatter:
markdown
---
layout: center
class: text-center
---单张幻灯片可单独设置Frontmatter:
markdown
---
layout: center
class: text-center
---Centered Slide
居中幻灯片
undefinedundefinedCommon Layouts
常用布局
- - Standard layout
default - - Centered content
center - - Two column layout
two-cols - - Image on right side
image-right - - Cover slide
cover
- - 标准布局
default - - 内容居中布局
center - - 双列布局
two-cols - - 图片居右布局
image-right - - 封面幻灯片
cover
Two Column Layout Example
双列布局示例
markdown
---
layout: two-cols
---markdown
---
layout: two-cols
---Left Column
左列
Content here
::right::
Content here
::right::
Right Column
右列
Content here
undefinedContent here
undefinedInteractive Features
交互功能
Click Animations
点击动画
Use for progressive reveals:
v-clickhtml
<v-click>
Content appears on click
</v-click>
<v-clicks>
- Item 1
- Item 2
- Item 3
</v-clicks>使用实现内容逐步展示:
v-clickhtml
<v-click>
点击后显示的内容
</v-click>
<v-clicks>
- 项1
- 项2
- 项3
</v-clicks>Components
组件
Use Vue components in slides:
Custom one are stored directory
packages/slides/componentshtml
<Counter :count="10" />可在幻灯片中使用Vue组件:
自定义组件存储在目录
packages/slides/componentshtml
<Counter :count="10" />Code Blocks
代码块
Syntax highlighting with line highlighting:
markdown
```ts {1|3|1-3}
const message = "Hello"
console.log(message)
```支持语法高亮及行高亮:
markdown
```ts {1|3|1-3}
const message = "Hello"
console.log(message)
```Presenter Notes
演示者备注
Add notes in HTML comments at the end of slides:
markdown
---在幻灯片末尾通过HTML注释添加备注:
markdown
---Slide Title
幻灯片标题
Content
<!--
These are presenter notes
Only visible in presenter mode
-->
undefinedContent
<!--
这是演示者备注
仅在演示者模式下可见
-->
undefinedBest Practices
最佳实践
- Keep slides focused - One concept per slide
- Use progressive disclosure - Reveal information with v-click
- Add presenter notes - Document your talking points
- Leverage layouts - Use built-in layouts for consistency
- Interactive components - Enhance with Vue components when needed
- 保持幻灯片聚焦 - 每张幻灯片只讲一个概念
- 逐步展示内容 - 使用v-click逐步披露信息
- 添加演示者备注 - 记录你的演讲要点
- 利用内置布局 - 使用内置布局保持风格统一
- 使用交互组件 - 必要时通过Vue组件增强演示效果
Common Commands
常用命令
bash
undefinedbash
undefinedDevelopment
开发模式
pnpm run slides [filename]
pnpm run slides [filename]
Build static version
构建静态版本
pnpm --filter @chris-towles/slides run build
pnpm --filter @chris-towles/slides run build
Export to PDF
导出为PDF
pnpm --filter @chris-towles/slides run export
undefinedpnpm --filter @chris-towles/slides run export
undefinedResources
资源
- Slidev Documentation: https://sli.dev/
- Themes: https://sli.dev/resources/theme-gallery
- Built-in Components: https://sli.dev/builtin/components.html