11import starlight from '@astrojs/starlight' ;
2- import { pluginCollapsibleSections } from '@expressive-code/plugin-collapsible-sections' ;
2+ import xmdx from 'astro-xmdx' ;
3+ import { starlightPreset } from 'astro-xmdx/presets' ;
34import { defineConfig , sharpImageService } from 'astro/config' ;
45import rehypeSlug from 'rehype-slug' ;
56import remarkSmartypants from 'remark-smartypants' ;
@@ -28,9 +29,6 @@ export default defineConfig({
2829 ] ) ,
2930 starlight ( {
3031 title : 'Docs' ,
31- expressiveCode : {
32- plugins : [ pluginCollapsibleSections ( ) ] ,
33- } ,
3432 components : {
3533 EditLink : './src/components/starlight/EditLink.astro' ,
3634 Hero : './src/components/starlight/Hero.astro' ,
@@ -72,6 +70,10 @@ export default defineConfig({
7270 plugins : [ starlightPluginSmokeTest ( ) , starlightPluginLlmsTxt ( ) ] ,
7371 } ) ,
7472 sitemap ( ) ,
73+ xmdx ( {
74+ presets : [ starlightPreset ( { expressiveCode : false } ) ] ,
75+ expressiveCode : { enabled : true , importSource : '@astrojs/starlight/components' } ,
76+ } ) ,
7577 ] ,
7678 trailingSlash : 'always' ,
7779 scopedStyleStrategy : 'where' ,
@@ -95,4 +97,9 @@ export default defineConfig({
9597 domains : [ 'avatars.githubusercontent.com' ] ,
9698 service : sharpImageService ( ) ,
9799 } ,
100+ vite : {
101+ ssr : {
102+ noExternal : [ 'xmdx' ] ,
103+ } ,
104+ } ,
98105} ) ;
0 commit comments