Skip to content

[Docs]: enhance docs of using slot to customize theme #1263

Open
@Timeless0911

Description

@Timeless0911

What problem does this feature solve?

https://rspress.dev/guide/advanced/custom-theme#2-use-slot

The doc of using slot to customize theme only provided a demo with <Layout> component, it contains <HomeLayout>, DocLayout, Nav, etc...

  const {
    top,
    bottom,
    beforeDocFooter,
    afterDocFooter,
    beforeDoc,
    afterDoc,
    beforeDocContent,
    afterDocContent,
    beforeSidebar,
    afterSidebar,
    beforeOutline,
    afterOutline,
    beforeNavTitle,
    afterNavTitle,
    beforeNav,
    beforeHero,
    afterHero,
    beforeFeatures,
    afterFeatures,
    afterNavMenu,
  } = props;

We can both set them in <Layout>, but also set them separately in <HomeLayout>, we should add some demo in https://rspress.dev/guide/default-theme/home-page to link something from https://rspress.dev/guide/advanced/custom-theme#2-use-slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions