Skip to content

Commit dc8b462

Browse files
jpoehneltautofix-ci[bot]antfu
authoredMar 31, 2025··
fix: aspectRatio type in schema (#2089)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Anthony Fu <github@antfu.me>
1 parent b4c58ab commit dc8b462

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed
 

‎packages/types/src/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export interface ResolvedSlidevConfigSub {
55
export: ResolvedExportOptions
66
drawings: ResolvedDrawingsOptions
77
fonts: ResolvedFontOptions
8+
aspectRatio: number
89
}
910

1011
export interface SlidevConfig extends

‎packages/types/src/frontmatter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export interface HeadmatterConfig extends TransitionOptions {
100100
*
101101
* @default '16/9'
102102
*/
103-
aspectRatio?: number
103+
aspectRatio?: number | string
104104
/**
105105
* The actual width for slides canvas.
106106
* unit in px.

‎packages/vscode/schema/headmatter.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@
242242
"default": "history"
243243
},
244244
"aspectRatio": {
245-
"type": "number",
245+
"type": [
246+
"number",
247+
"string"
248+
],
246249
"description": "Aspect ratio for slides should be like `16/9` or `1:1`",
247250
"markdownDescription": "Aspect ratio for slides\nshould be like `16/9` or `1:1`",
248251
"default": "16/9"

0 commit comments

Comments
 (0)
Please sign in to comment.