<PageBacklinks>
The <PageBacklinks>
component extends the <Backlinks>
component,
and handles whether the backlinks should be displayed on this page, automatically sets the
slug
prop of the <Backlinks>
component to the current page’s slug, and the passed frontmatter properties.
Import
Section titled “Import”import { PageBacklinks } from 'starlight-site-graph/components';
Display the backlinks component corresponding to the current page.
<PageBacklinks> <span slot="title">Fancy Backlinks Title</span></PageBacklinks>
{% pagebacklinks /%}
Visibility
Section titled “Visibility”The visibility of the <PageBacklinks>
component is determined, in order of precedence, by the following:
- This component’s
showBacklinks
prop - The page’s
visible
frontmatter property - The backlinksConfig’s
visibilityRules
configuration
<PageBacklinks>
Props
Section titled “<PageBacklinks> Props”The <PageBacklinks>
component accepts the following props:
type: string
(optional)
Determines the slug of the current page. If not provided, the slug will be determined by the current page’s URL.
type: { data: PageSiteGraphFrontmatter }
(optional)
The frontmatter properties related to the current page, for more information of what properties can be passed via this object, check out the frontmatter config.
type: string
(optional)
Additional classes to apply to the component.
showBacklinks
Section titled “showBacklinks”type: boolean
(optional)
Determines whether the backlinks should be displayed on this page.
Will override both the page’s visible
frontmatter property and the backlinksConfig’s visibilityRules
configuration.