General
This page gives an overview of all the general configuration options for the graph component, specifically about how it is determines which nodes are shown in the graph, what actions are available, and when the graph is displayed.
Depth
The depth
option determines the depth of the graph, how many levels of links are shown.
-x
: Show the entire graph (the particular value ofx
is ignored).0
: Show only the current node.1
: Show the current node and its immediate neighbors.x
: Show nodes up tox
hops away from the current node.5>
: Show the entire graph (the particular value ofx
is ignored).
When the depth is negative, the graph will show all nodes in the graph, even if they are not reachable from the current node.
The graph will be traversed in the direction specified by the depthDirection
option.
Depth Direction
The depthDirection
option determines the direction in which the links of the graph are expanded.
both
: The graph will be expanded in both directions.incoming
: The graph will only be expanded in the direction of incoming links.outgoing
: The graph will only be expanded in the direction of outgoing links.
This setting is ignored once a depth of 5 or higher is reached.
Actions
actions
is an array of strings which specify which action buttons are included in the graph.
The order of the actions in the array determines the order in which they are displayed in the top right of the graph.
For more information on what each individual action does, see the Graph Actions page.
Visibility Rules
The visibilityRules
option is a list of glob patterns that determine when the <PageGraph />
component
(e.g. the graph in the Starlight sidebar) will be shown.
When using the plugin it its default configuration (with Starlight), the graph will also only be shown if the sidebar is visible.
<PageGraph />
is shown on all pages.
Directorysrc
Directorycontent
Directorydocs
Directoryprivate
- page.md //
<PageGraph>
is shown
- page.md //
Directorypublic
- page.md //
<PageGraph>
is shown - cool-stuff.md //
<PageGraph>
is shown
- page.md //
<PageGraph />
is never shown because the first rule matches all pages.
Directorysrc
Directorycontent
Directorydocs
Directoryprivate
- page.md //
<PageGraph>
is not shown
- page.md //
Directorypublic
- page.md //
<PageGraph>
is not shown - cool-stuff.md //
<PageGraph>
is not shown
- page.md //
<PageGraph />
is only shown on pages in the public
directory.
Directorysrc
Directorycontent
Directorydocs
Directoryprivate
- page.md //
<PageGraph>
is not shown
- page.md //
Directorypublic
- page.md //
<PageGraph>
is shown - cool-stuff.md //
<PageGraph>
is shown
- page.md //
<PageGraph />
is only shown on pages with the name page.md
.
Directorysrc
Directorycontent
Directorydocs
Directoryprivate
- page.md //
<PageGraph>
is shown
- page.md //
Directorypublic
- page.md //
<PageGraph>
is shown - cool-stuff.md //
<PageGraph>
is not shown
- page.md //
<PageGraph />
is shown on all pages except for those in the public
directory.
Directorysrc
Directorycontent
Directorydocs
Directoryprivate
- page.md //
<PageGraph>
is shown
- page.md //
Directorypublic
- page.md //
<PageGraph>
is not shown - cool-stuff.md //
<PageGraph>
is not shown
- page.md //