HomeLayout
This component is mainly used in conjunction with wrap/eject in Custom Theme , and is different from components that are directly imported in MDX. You can modify the styles and functions by passing component props or directly overriding the component. If you override the entire component through eject, please note that the reading of the corresponding configuration options of the component will become invalid and you need to control it yourself.
HomeLayout is the layout component for the homepage, responsible for integrating and rendering the Hero, Features, and Footer sections.
Usage
Modify or override through custom theme:
The HomeLayout component reads the hero and features configuration from frontmatter through useFrontmatter. For detailed configuration options, refer to Frontmatter Configuration.
Custom slots
Use slot props to insert custom content before and after each section:
Props
beforeHero
- Type:
React.ReactNode
Custom content to insert before the Hero section.
afterHero
- Type:
React.ReactNode
Custom content to insert after the Hero section.
beforeHeroActions
- Type:
React.ReactNode
Custom content to insert before the Hero buttons, passed to the HomeHero component.
afterHeroActions
- Type:
React.ReactNode
Custom content to insert after the Hero buttons, passed to the HomeHero component.
beforeFeatures
- Type:
React.ReactNode
Custom content to insert before the Features section.
afterFeatures
- Type:
React.ReactNode
Custom content to insert after the Features section.
Sub-components
HomeLayout uses the following components internally:
- HomeBackground - Homepage background
- HomeHero - Hero section
- HomeFeature - Features section
- HomeFooter - Footer section