slidev-project-structure
Understand Slidev project structure and configuration. Use this skill to configure themes, addons, and customize your presentation setup.
What this skill does
# Slidev Project Structure
This skill helps you understand the complete structure of a Slidev project, including configuration files, directory conventions, and customization options.
## When to Use This Skill
- Setting up a complex Slidev project
- Adding custom components or layouts
- Configuring themes and addons
- Understanding where to put assets and styles
- Troubleshooting project structure issues
## Standard Project Structure
```
my-presentation/
├── slides.md # Main presentation file
├── package.json # Project dependencies
├── components/ # Custom Vue components
│ └── Counter.vue
├── layouts/ # Custom layouts
│ └── my-layout.vue
├── pages/ # Additional slide files
│ └── intro.md
├── public/ # Static assets
│ ├── images/
│ └── favicon.ico
├── styles/ # Global styles
│ └── index.css
├── setup/ # Setup scripts
│ ├── main.ts # Vue app setup
│ ├── monaco.ts # Monaco editor setup
│ └── shiki.ts # Shiki highlighter setup
├── snippets/ # External code snippets
│ └── example.ts
├── .slidev/ # Generated files (gitignore)
│ └── drawings/ # Persisted drawings
├── vite.config.ts # Vite configuration
├── uno.config.ts # UnoCSS configuration
└── netlify.toml # Deployment config (optional)
```
## Core Files
### slides.md
The main presentation file containing all slides:
```markdown
---
theme: seriph
title: My Presentation
---
# Slide 1
---
# Slide 2
```
### package.json
Essential scripts and dependencies:
```json
{
"name": "my-presentation",
"private": true,
"scripts": {
"dev": "slidev --open",
"build": "slidev build",
"export": "slidev export"
},
"dependencies": {
"@slidev/cli": "^0.50.0",
"@slidev/theme-seriph": "^0.25.0"
}
}
```
## Global Configuration
### Headmatter (First Slide)
The first slide's frontmatter configures the entire presentation:
```yaml
---
# Theme
theme: seriph
addons:
- slidev-addon-excalidraw
# Metadata
title: My Presentation
titleTemplate: '%s - Slidev'
info: |
## Slidev Starter Template
Presentation slides for developers.
# Appearance
colorSchema: auto
aspectRatio: 16/9
canvasWidth: 980
themeConfig:
primary: '#5d8392'
# Code
highlighter: shiki
lineNumbers: true
monaco: true
# Features
drawings:
enabled: true
persist: true
presenterOnly: false
syncAll: true
selectable: true
record: true
# Navigation
transition: slide-left
clicks: auto
# Export
exportFilename: my-presentation
download: true
# Layout
layout: cover
background: /cover.jpg
class: text-center
---
```
## Directory Conventions
### components/
Custom Vue components auto-imported into slides:
```vue
<!-- components/Counter.vue -->
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(0)
</script>
<template>
<div class="flex items-center gap-4">
<button @click="count--">-</button>
<span>{{ count }}</span>
<button @click="count++">+</button>
</div>
</template>
```
Use in slides:
```markdown
# Interactive Counter
<Counter />
```
### layouts/
Custom layouts extend built-in ones:
```vue
<!-- layouts/my-intro.vue -->
<template>
<div class="slidev-layout my-intro">
<div class="header">
<slot name="header" />
</div>
<div class="main">
<slot />
</div>
<div class="footer">
<slot name="footer">
<span>My Company</span>
</slot>
</div>
</div>
</template>
<style scoped>
.my-intro {
display: grid;
grid-template-rows: auto 1fr auto;
height: 100%;
padding: 2rem;
}
</style>
```
Use in slides:
```markdown
---
layout: my-intro
---
::header::
# Welcome
::default::
Main content here
::footer::
Custom footer
```
### public/
Static assets served at root URL:
```
public/
├── images/
│ ├── logo.png # Use: /images/logo.png
│ └── diagram.svg
├── favicon.ico # Use: /favicon.ico
└── data.json # Use: /data.json
```
### styles/
Global styles applied to all slides:
```css
/* styles/index.css */
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');
:root {
--slidev-theme-primary: #3b82f6;
}
.slidev-layout {
font-family: 'Inter', sans-serif;
}
/* Custom utility classes */
.highlight {
background: linear-gradient(120deg, #84fab0 0%, #8fd3f4 100%);
padding: 0 0.25em;
}
```
### setup/
Configuration scripts:
```typescript
// setup/main.ts - Vue app configuration
import { defineAppSetup } from '@slidev/types'
export default defineAppSetup(({ app, router }) => {
// Register global components
// Configure plugins
})
```
```typescript
// setup/shiki.ts - Code highlighter
import { defineShikiSetup } from '@slidev/types'
export default defineShikiSetup(() => {
return {
themes: {
dark: 'vitesse-dark',
light: 'vitesse-light',
},
}
})
```
```typescript
// setup/monaco.ts - Monaco editor
import { defineMonacoSetup } from '@slidev/types'
export default defineMonacoSetup(() => {
return {
editorOptions: {
fontSize: 14,
minimap: { enabled: false },
},
}
})
```
### pages/
Additional slide files for modular presentations:
```markdown
<!-- pages/intro.md -->
# Introduction Section
---
# About Me
---
# Agenda
```
Import in main file:
```markdown
---
src: ./pages/intro.md
---
---
# Main Content
---
---
src: ./pages/conclusion.md
---
```
## Vite Configuration
```typescript
// vite.config.ts
import { defineConfig } from 'vite'
export default defineConfig({
slidev: {
vue: {
// Vue plugin options
},
},
// Standard Vite options
server: {
port: 3030,
},
})
```
## UnoCSS Configuration
```typescript
// uno.config.ts
import { defineConfig } from 'unocss'
export default defineConfig({
shortcuts: {
'bg-main': 'bg-white dark:bg-slate-900',
'text-main': 'text-slate-900 dark:text-slate-100',
},
theme: {
colors: {
primary: '#3b82f6',
},
},
})
```
## Theme Configuration
### Using a Theme
```yaml
---
theme: seriph
themeConfig:
primary: '#5d8392'
secondary: '#8b5cf6'
---
```
### Ejecting a Theme
To customize a theme's source code:
```bash
slidev theme eject
```
This copies the theme to your project for full customization.
## Multi-File Presentations
### Importing Slides
```markdown
---
src: ./pages/section1.md
---
---
src: ./pages/section2.md
---
```
### With Frontmatter Merging
```markdown
---
src: ./pages/intro.md
title: Overridden Title
class: custom-class
---
```
## Generated Files (.slidev/)
The `.slidev/` directory contains:
- `drawings/` - Persisted drawings
- Other generated assets
Add to `.gitignore`:
```gitignore
.slidev
node_modules
dist
```
## Best Practices
1. **Keep slides.md focused**: Use `src` imports for large presentations
2. **Organize assets**: Use `public/images/` for all images
3. **Reuse components**: Create components for repeated patterns
4. **Version control**: Commit all source files except `.slidev/` and `dist/`
5. **Document custom layouts**: Add comments explaining slot usage
## Output Format
When explaining project structure, provide:
```
RECOMMENDED STRUCTURE:
├── slides.md # Main file
├── components/ # Custom Vue components
├── layouts/ # Custom layouts
├── public/ # Static assets
├── styles/ # Global CSS
└── package.json # Dependencies
KEY CONFIGURATION:
- Theme: [theme name]
- Addons: [list of addons]
- Custom components: [component names]
- Custom layouts: [layout names]
FILES TO CREATE:
1. [filename] - [purpose]
2. [filename] - [purpose]
GITIGNORE:
.slidev/
node_modules/
dist/
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.