mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
docs: Update homepage layout
This commit is contained in:
5 files changed
+95
-44
No files matched your search
+27
-2
@@ -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";
|
||||
Reference in new issue
Block a user