29 lines
812 B
TypeScript
29 lines
812 B
TypeScript
import { HomeLayout as BasicHomeLayout, DocContent } from "@rspress/core/theme";
|
|
|
|
import { useFrontmatter } from '@rspress/core/runtime';
|
|
interface HomeLayoutProps {
|
|
components?: Record<string, React.FC>;
|
|
}
|
|
|
|
function HomeLayout(props: HomeLayoutProps) {
|
|
console.log(props)
|
|
|
|
const { frontmatter } = useFrontmatter();
|
|
|
|
return (
|
|
<BasicHomeLayout
|
|
afterFeatures={
|
|
(frontmatter.doc) ?
|
|
<main className="rp-doc-layout__doc-container">
|
|
<div className="rp-doc rspress-doc">
|
|
<DocContent components={props.components} />
|
|
</div>
|
|
</main>
|
|
: <></>
|
|
}
|
|
/>
|
|
);
|
|
}
|
|
export { HomeLayout };
|
|
export * from "@rspress/core/theme";
|
|
import "./index.css";
|