Slidev

slidevjs/slidev/skills/slidev

作者 slidevjs73053ab2b965无许可证48K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库6天前更新

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.

AI 生成的概览

使用 Markdown 构建并演示基于 Slidev 的网页幻灯片,涵盖语法、布局、代码高亮、动画与导出。

功能
该技能指导智能体使用 Slidev(基于 Vite、Vue 和 Markdown 的幻灯片框架)创建和演示面向开发者的幻灯片。内容涵盖幻灯片语法、frontmatter 配置、内置布局与组件、代码高亮与 Monaco 编辑器、图表与 LaTeX、动画、演讲者与录制功能,以及导出和托管选项。它是一套纯说明性参考资料,随附的参考文件逐项说明各项功能,不包含可运行脚本。
适用场景
适用于制作技术演示、会议演讲、代码讲解、工作坊或教学材料等 Slidev 幻灯片。也适合需要实时代码示例、图表、数学公式、交互式演示、演讲者备注,或需要导出为 PDF、PPTX 或托管为 SPA 的场景。
运行要求
需要具备 Node.js 和 pnpm 的 Slidev 项目环境(如 pnpm create slidev、pnpm run dev、pnpm run build 等命令)。导出 PDF/PPTX/PNG 需要安装 playwright-chromium 开发依赖。该技能不附带脚本,仅为说明与参考文档。

Slidev - Presentation Slides for Developers

Web-based slides maker built on Vite, Vue, and Markdown.

When to Use

  • Technical presentations or slidedecks with live code examples
  • Syntax-highlighted code snippets with animations
  • Interactive demos (Monaco editor, runnable code)
  • Mathematical equations (LaTeX) or diagrams (Mermaid, PlantUML)
  • Record presentations with presenter notes
  • Export to PDF, PPTX, or host as SPA
  • Code walkthroughs for developer talks or workshops

Quick Start

bash
pnpm create slidev    # Create projectpnpm run dev          # Start dev server (opens http://localhost:3030)pnpm run build        # Build static SPApnpm run export       # Export to PDF (requires playwright-chromium)

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.

Basic Syntax

md
---theme: defaulttitle: My Presentation---
# First Slide
Content here
---
# Second Slide
More content
<!--Presenter notes go here-->
  • --- separates slides
  • First frontmatter = headmatter (deck config)
  • HTML comments = presenter notes

Core References

TopicDescriptionReference
Markdown SyntaxSlide separators, frontmatter, notes, code blockscore-syntax [blocked]
Animationsv-click, v-clicks, motion, transitionscore-animations [blocked]
HeadmatterDeck-wide configuration optionscore-headmatter [blocked]
FrontmatterPer-slide configuration optionscore-frontmatter [blocked]
CLI CommandsDev, build, export, theme commandscore-cli [blocked]
ComponentsBuilt-in Vue componentscore-components [blocked]
LayoutsBuilt-in slide layoutscore-layouts [blocked]
ExportingPDF, PPTX, PNG export optionscore-exporting [blocked]
HostingBuild and deploy to various platformscore-hosting [blocked]
Global Context$nav, $slidev, composables APIcore-global-context [blocked]

Feature Reference

Code & Editor

FeatureUsageReference
Line highlighting```ts {2,3}code-line-highlighting [blocked]
Click-based highlighting```ts {1|2-3|all}code-line-highlighting [blocked]
Line numberslineNumbers: true or {lines:true}code-line-numbers [blocked]
Scrollable code{maxHeight:'100px'}code-max-height [blocked]
Code tabs::code-group (requires comark: true)code-groups [blocked]
Monaco editor```ts {monaco}editor-monaco [blocked]
Run code```ts {monaco-run}editor-monaco-run [blocked]
Edit files<<< ./file.ts {monaco-write}editor-monaco-write [blocked]
Code animations````md magic-movecode-magic-move [blocked]
TypeScript types```ts twoslashcode-twoslash [blocked]
Import code<<< @/snippets/file.jscode-import-snippet [blocked]

Diagrams & Math

FeatureUsageReference
Mermaid diagrams```mermaiddiagram-mermaid [blocked]
PlantUML diagrams```plantumldiagram-plantuml [blocked]
LaTeX math$inline$ or $$block$$diagram-latex [blocked]

Layout & Styling

FeatureUsageReference
Canvas sizecanvasWidth, aspectRatiolayout-canvas-size [blocked]
Zoom slidezoom: 0.8layout-zoom [blocked]
Scale elements<Transform :scale="0.5">layout-transform [blocked]
Layout slots::right::, ::default::layout-slots [blocked]
Scoped CSS<style> in slidestyle-scoped [blocked]
Global layersglobal-top.vue, global-bottom.vuelayout-global-layers [blocked]
Draggable elementsv-drag, <v-drag>layout-draggable [blocked]
Icons<mdi-icon-name />style-icons [blocked]

Animation & Interaction

FeatureUsageReference
Click animationsv-click, <v-clicks>core-animations [blocked]
Rough markersv-mark.underline, v-mark.circleanimation-rough-marker [blocked]
Drawing modePress C or config drawings:animation-drawing [blocked]
Direction stylesforward:delay-300style-direction [blocked]
Note highlighting[click] in notesanimation-click-marker [blocked]

Syntax Extensions

FeatureUsageReference
Comark syntaxcomark: true + {style="color:red"}syntax-comark [blocked]
Block frontmatter```yaml instead of ---syntax-block-frontmatter [blocked]
Import slidessrc: ./other.mdsyntax-importing-slides [blocked]
Merge frontmatterMain entry winssyntax-frontmatter-merging [blocked]

Presenter & Recording

FeatureUsageReference
RecordingPress G for camerapresenter-recording [blocked]
Timerduration: 30min, timer: countdownpresenter-timer [blocked]
Remote controlslidev --remotepresenter-remote [blocked]
Ruby textnotesAutoRuby:presenter-notes-ruby [blocked]

Export & Build

FeatureUsageReference
Export optionsslidev exportcore-exporting [blocked]
Build & deployslidev buildcore-hosting [blocked]
Build with PDFdownload: truebuild-pdf [blocked]
Cache imagesAutomatic for remote URLsbuild-remote-assets [blocked]
OG imageseoMeta.ogImage or og-image.pngbuild-og-image [blocked]
SEO tagsseoMeta:build-seo-meta [blocked]

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.

Editor & Tools

FeatureUsageReference
Side editorClick edit iconeditor-side [blocked]
VS Code extensionInstall antfu.slideveditor-vscode [blocked]
Prettierprettier-plugin-slideveditor-prettier [blocked]
Eject themeslidev theme ejecttool-eject-theme [blocked]
MCP server (AI agents)http://localhost:<port>/__mcp or slidev mcptool-mcp [blocked]

Lifecycle & API

FeatureUsageReference
Slide hooksonSlideEnter(), onSlideLeave()api-slide-hooks [blocked]
Navigation API$nav, useNav()core-global-context [blocked]

Common Layouts

LayoutPurpose
coverTitle/cover slide
centerCentered content
defaultStandard slide
two-colsTwo columns (use ::right::)
two-cols-headerHeader + two columns
image / image-left / image-rightImage layouts
iframe / iframe-left / iframe-rightEmbed URLs
quoteQuotation
sectionSection divider
fact / statementData/statement display
intro / endIntro/end slides

Resources

来源与署名

来源:slidevjs/slidev位于skills/slidev提交73053ab

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架