Components
The Starlight Group Pages plugin provides a component to render the link cards of a group page on any page of your docs.
<GroupPageCards>
Section titled “<GroupPageCards>”The <GroupPageCards> component renders the link cards of a directory, e.g. to list your guides on your landing page or to place the link cards of an index page somewhere else than at its end.
---title: Welcome---
import GroupPageCards from "starlight-group-pages/components/GroupPageCards.astro";
## Guides
<GroupPageCards directory="guides" />The component renders the same link cards as the group page of the directory, see “Group Pages”, with the layout of your configuration.
On multilingual sites, it uses the content of the language of the current page.
The following link cards are rendered with <GroupPageCards directory="demo/guides" />:
directory
Section titled “directory”Type: string
Required
The directory to list, relative to src/content/docs/ and without the locale of multilingual sites, e.g. guides or guides/advanced.
The build fails if the directory contains no page visible in the sidebar.
Place the link cards of an index page
Section titled “Place the link cards of an index page”By default, the link cards of a directory are appended to its index page.
To place them somewhere else in the page, set the extendIndexPages option to false and render the component in your index page:
---title: Guides---
import GroupPageCards from "starlight-group-pages/components/GroupPageCards.astro";
Start with one of the following guides:
<GroupPageCards directory="guides" />
Still stuck? Ask for help on Discord.