@@ -74,16 +74,24 @@ export function resolveConfig(headmatter: any, themeMeta: SlidevThemeMeta = {},
7474 ...headmatter . config ,
7575 ...headmatter ,
7676 fonts : resolveFonts ( {
77+ ...defaultConfig . fonts ,
7778 ...themeMeta . defaults ?. fonts ,
7879 ...headmatter . config ?. fonts ,
7980 ...headmatter ?. fonts ,
8081 } ) ,
8182 drawings : resolveDrawings ( headmatter . drawings , filepath ) ,
8283 htmlAttrs : {
84+ ...defaultConfig . htmlAttrs ,
8385 ...themeMeta . defaults ?. htmlAttrs ,
8486 ...headmatter . config ?. htmlAttrs ,
8587 ...headmatter ?. htmlAttrs ,
8688 } ,
89+ themeConfig : {
90+ ...defaultConfig . themeConfig ,
91+ ...themeMeta . defaults ?. themeConfig ,
92+ ...headmatter . config ?. themeConfig ,
93+ ...headmatter ?. themeConfig ,
94+ } ,
8795 }
8896
8997 // @ts -expect-error compat
@@ -139,13 +147,13 @@ export function resolveFonts(fonts: FontOptions = {}): ResolvedFontOptions {
139147 italic = false ,
140148 provider = 'google' ,
141149 } = fonts
142- let sans = toArray ( fonts . sans ) . flatMap ( i => i . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
143- let serif = toArray ( fonts . serif ) . flatMap ( i => i . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
144- let mono = toArray ( fonts . mono ) . flatMap ( i => i . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
145- const weights = toArray ( fonts . weights || '200,400,600' ) . flatMap ( i => i . toString ( ) . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
146- const custom = toArray ( fonts . custom ) . flatMap ( i => i . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
150+ let sans = toArray ( fonts . sans ) . flatMap ( i => i . split ( ',' ) ) . map ( i => i . trim ( ) )
151+ let serif = toArray ( fonts . serif ) . flatMap ( i => i . split ( ',' ) ) . map ( i => i . trim ( ) )
152+ let mono = toArray ( fonts . mono ) . flatMap ( i => i . split ( ',' ) ) . map ( i => i . trim ( ) )
153+ const weights = toArray ( fonts . weights || '200,400,600' ) . flatMap ( i => i . toString ( ) . split ( ',' ) ) . map ( i => i . trim ( ) )
154+ const custom = toArray ( fonts . custom ) . flatMap ( i => i . split ( ',' ) ) . map ( i => i . trim ( ) )
147155
148- const local = toArray ( fonts . local ) . flatMap ( i => i . split ( / , \s * / g ) ) . map ( i => i . trim ( ) )
156+ const local = toArray ( fonts . local ) . flatMap ( i => i . split ( ',' ) ) . map ( i => i . trim ( ) )
149157 const webfonts = fonts . webfonts
150158 ? fonts . webfonts
151159 : fallbacks
0 commit comments