File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 1
- import { Layout as BaseLayout } from '@rspress/core/theme' ;
1
+ import {
2
+ Layout as BaseLayout ,
3
+ getCustomMDXComponent as basicGetCustomMDXComponent ,
4
+ } from '@rspress/core/theme' ;
5
+ import {
6
+ LlmsContainer ,
7
+ LlmsCopyButton ,
8
+ LlmsViewOptions ,
9
+ } from '@rspress/plugin-llms/runtime' ;
2
10
import { NavIcon } from '@rstack-dev/doc-ui/nav-icon' ;
11
+
3
12
import { HomeLayout } from './pages' ;
4
13
import './index.scss' ;
5
14
15
+ export function getCustomMDXComponent ( ) {
16
+ const { h1 : H1 , ...mdxComponents } = basicGetCustomMDXComponent ( ) ;
17
+
18
+ const MyH1 = ( { ...props } ) => {
19
+ return (
20
+ < >
21
+ < H1 { ...props } />
22
+ < LlmsContainer >
23
+ < LlmsCopyButton />
24
+ < LlmsViewOptions />
25
+ </ LlmsContainer >
26
+ </ >
27
+ ) ;
28
+ } ;
29
+ return {
30
+ ...mdxComponents ,
31
+ h1 : MyH1 ,
32
+ } ;
33
+ }
34
+
6
35
const Layout = ( ) => {
7
36
return < BaseLayout beforeNavTitle = { < NavIcon /> } /> ;
8
37
} ;
You can’t perform that action at this time.
0 commit comments