docs: Update homepage layout

This commit is contained in:
Jade Ellis committed 2025-11-22 22:41:53 +00:00
1 parent c1dc336c65
commit 3bf3c24d22
5 files changed
+95 -44

No files matched your search

+27 -2
View File
@@ -1,4 +1,29 @@
import { HomeLayout as BasicHomeLayout, DocContent } from "@rspress/core/theme";
export * from '@rspress/core/theme';
import { useFrontmatter } from '@rspress/core/runtime';
interface HomeLayoutProps {
components?: Record<string, React.FC>;
}
import './index.css';
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";