<Graph>
The <Graph>
component handles the rendering of the graph given slug, config and sitemap properties.
This can be useful when you want to display a completely custom graph.
Import
Section titled “Import”import { Graph } from 'starlight-site-graph/components';
Display a graph component with a custom configuration and sitemap.
<Graph config={{...}} sitemap={{"node/": { title: "Node", exists: true }}} slug={"node/"}/>
{% graph config={{...}} sitemap={{"node/": { title: "Node", exists: true }}} slug={"node/"}/%}
<Graph>
Props
Section titled “<Graph> Props”The <Graph>
component accepts the following props:
type: string
Determines the slug of the current page.
config
Section titled “config”type: GraphConfig
The configuration object for the graph, for information on what can be passed, check out the configuration documentation.\
sitemap
Section titled “sitemap”type: sitemapSchema
The sitemap object, which contains all the information about pages, links and other information. For more information on how this object should be structured, check out the sitemap configuration documentation.