diff --git a/website/theme/index.tsx b/website/theme/index.tsx index f3362ee1c..02cc95e8a 100644 --- a/website/theme/index.tsx +++ b/website/theme/index.tsx @@ -1,4 +1,7 @@ -import { Layout as BaseLayout } from '@rspress/core/theme'; +import { + getCustomMDXComponent as BaseGetCustomMDXComponent, + Layout as BaseLayout, +} from '@rspress/core/theme'; import { Search as PluginAlgoliaSearch, ZH_LOCALES, @@ -7,6 +10,31 @@ import { NavIcon } from '@rstack-dev/doc-ui/nav-icon'; import { HomeLayout } from './pages'; import './index.scss'; import { useLang } from '@rspress/core/runtime'; +import { + LlmsContainer, + LlmsCopyButton, + LlmsViewOptions, +} from '@rspress/plugin-llms/runtime'; + +export function getCustomMDXComponent() { + const { h1: H1, ...mdxComponents } = BaseGetCustomMDXComponent(); + + const MyH1 = ({ ...props }) => { + return ( + <> +

+ + + + + + ); + }; + return { + ...mdxComponents, + h1: MyH1, + }; +} const Layout = () => { return } />;