0
# Options and Configuration System
1
2
Core configuration interfaces for Slidev server options, entry configuration, and resolved utilities.
3
4
## Capabilities
5
6
### Roots Information
7
8
Configuration interface for Slidev runtime roots and workspace information.
9
10
```typescript { .api }
11
/**
12
* Roots information for Slidev runtime environment
13
*/
14
interface RootsInfo {
15
/** CLI package root directory */
16
cliRoot: string;
17
/** Client package root directory */
18
clientRoot: string;
19
/** User project root directory */
20
userRoot: string;
21
/** User package.json contents */
22
userPkgJson: Record<string, any>;
23
/** User workspace root directory */
24
userWorkspaceRoot: string;
25
}
26
```
27
28
### Slidev Entry Options
29
30
Configuration options for Slidev entry and initialization.
31
32
```typescript { .api }
33
/**
34
* Configuration options for Slidev entry
35
*/
36
interface SlidevEntryOptions {
37
/** Markdown entry file path */
38
entry: string;
39
/** Theme identifier to use */
40
theme?: string;
41
/** Remote password for remote presentations */
42
remote?: string;
43
/** Enable inspect plugin for debugging */
44
inspect?: boolean;
45
/** Build with download option enabled */
46
download?: boolean;
47
/** Base URL for dev or build mode */
48
base?: string;
49
}
50
```
51
52
### Resolved Slidev Options
53
54
Comprehensive resolved options combining all configuration aspects.
55
56
```typescript { .api }
57
/**
58
* Fully resolved Slidev configuration options
59
*/
60
interface ResolvedSlidevOptions extends RootsInfo, SlidevEntryOptions {
61
/** Parsed slide data */
62
data: SlidevData;
63
/** Raw theme identifier string */
64
themeRaw: string;
65
/** Theme root directories */
66
themeRoots: string[];
67
/** Addon root directories */
68
addonRoots: string[];
69
/** Combined roots array (excludes clientRoot) */
70
roots: string[];
71
/** Current mode: development, build, or export */
72
mode: 'dev' | 'build' | 'export';
73
/** Resolved utilities and tools */
74
utils: ResolvedSlidevUtils;
75
}
76
```
77
78
### Resolved Slidev Utilities
79
80
Utility interfaces and tools available in resolved Slidev configuration.
81
82
```typescript { .api }
83
/**
84
* Resolved utilities for Slidev operations
85
*/
86
interface ResolvedSlidevUtils {
87
/** Shiki syntax highlighter instance */
88
shiki: HighlighterGeneric<any, any>;
89
/** Shiki configuration options */
90
shikiOptions: MarkdownItShikiOptions;
91
/** KaTeX configuration options (null if disabled) */
92
katexOptions: KatexOptions | null;
93
/** Base HTML template string */
94
indexHtml: string;
95
/** Vite define configuration */
96
define: Record<string, string>;
97
/** Icon resolution paths */
98
iconsResolvePath: string[];
99
/** Function to check if Monaco types should be ignored for a package */
100
isMonacoTypesIgnored: (pkg: string) => boolean;
101
/** Function to get available layout components */
102
getLayouts: () => Record<string, string>;
103
}
104
```
105
106
### Server Options
107
108
Configuration options for Slidev development server.
109
110
```typescript { .api }
111
/**
112
* Slidev server configuration options
113
*/
114
interface SlidevServerOptions {
115
/**
116
* Custom data loading function
117
* @returns false if server should be restarted
118
*/
119
loadData?: (loadedSource: Record<string, string>) => Promise<SlidevData | false>;
120
}
121
```
122
123
## Types
124
125
```typescript { .api }
126
import type { MarkdownItShikiOptions } from '@shikijs/markdown-it';
127
import type { KatexOptions } from 'katex';
128
import type { HighlighterGeneric } from 'shiki';
129
import type { SlidevData } from './types';
130
```