File tree 5 files changed +14
-3
lines changed
5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' nextra-theme-docs ' : patch
3
+ ' nextra ' : patch
4
+ ---
5
+
6
+ fix unclickable links in TOC
7
+
8
+ allow passing ` recmaPlugins ` in ` mdxOptions `
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export function Bleed({
12
12
< div
13
13
className = { cn (
14
14
'nextra-bleed _relative _-mx-6 _mt-6 md:_-mx-8 2xl:_-mx-24' ,
15
+ '_z-[1]' , // for firefox https://github.com/shuding/nextra/issues/2824
15
16
full && [
16
17
// 'md:mx:[calc(-50vw+50%+8rem)',
17
18
'ltr:xl:_ml-[calc(50%-50vw+16rem)] ltr:xl:_mr-[calc(50%-50vw)]' ,
Original file line number Diff line number Diff line change @@ -56,8 +56,7 @@ export function TOC({ toc, filePath }: TOCProps): ReactElement {
56
56
< div
57
57
className = { cn (
58
58
'nextra-scrollbar _sticky _top-16 _overflow-y-auto _pr-4 _pt-6 _text-sm [hyphens:auto]' ,
59
- '_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4' ,
60
- '_z-[-1]' // for firefox https://github.com/shuding/nextra/issues/2824
59
+ '_max-h-[calc(100vh-var(--nextra-navbar-height)-env(safe-area-inset-bottom))] ltr:_-mr-4 rtl:_-ml-4'
61
60
) }
62
61
>
63
62
{ hasHeadings && (
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ export async function compileMdx(
107
107
outputFormat = 'function-body' ,
108
108
remarkPlugins,
109
109
rehypePlugins,
110
+ recmaPlugins,
110
111
rehypePrettyCodeOptions
111
112
} : MdxOptions = mdxOptions
112
113
@@ -344,7 +345,8 @@ export async function compileMdx(
344
345
}
345
346
}
346
347
} ) satisfies Plugin < [ ] , Program > ,
347
- isRemoteContent ? recmaRewriteFunctionBody : recmaRewriteJsx
348
+ isRemoteContent ? recmaRewriteFunctionBody : recmaRewriteJsx ,
349
+ ...( recmaPlugins || [ ] )
348
350
] . filter ( truthy )
349
351
} )
350
352
}
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ export const nextraConfigSchema = z
102
102
mdxOptions : z . strictObject ( {
103
103
rehypePlugins : z . custom < ProcessorOptions [ 'rehypePlugins' ] > ( ) ,
104
104
remarkPlugins : z . custom < ProcessorOptions [ 'remarkPlugins' ] > ( ) ,
105
+ recmaPlugins : z . custom < ProcessorOptions [ 'recmaPlugins' ] > ( ) ,
105
106
format : z . enum ( [ 'detect' , 'mdx' , 'md' ] ) ,
106
107
rehypePrettyCodeOptions : z . custom < RehypePrettyCodeOptions > ( )
107
108
} )
You can’t perform that action at this time.
0 commit comments