Skip to content

Graph

This page discusses how you can use frontmatter to configure how the <PageGraph /> component renders the graph for this page.

Visibility

The visible frontmatter key allows you to explicitly show or hide the graph view for a page, when using the <PageGraph /> component.

Graph will be revealed in the page.

src/content/docs/my-page.md
---
title: My Page
graph:
visible: true
---
Some important text.

Node Style

The nodeStyle frontmatter key allows you to specify the style of the node corresponding to this page in the graph. Any style defined in Node Style can be used here. This will override any and all other styles applied to the node.

A regular, unstyled node.

src/content/docs/node.md
---
title: Node
---
Some important text.
{}

Other Config

You can also override any of the global graph settings using the frontmatter of a page. Specifically, any of the graph configuration options can be set in the frontmatter of a page, except for the prefetchPages and visiblityRules options.

Unchanged graph.

src/content/docs/node.md
---
title: Node
---
Some important text.
{}