Skip to content

Node Rendering

On this page, you can find all the configuration options related to the rendering of nodes in the site graph, both in terms of which nodes are shown and how they are styled.

If you are looking for how an individual node can be styled, check out the node style page.

Render Unresolved Nodes

The renderUnresolved option toggles the rendering of unresolved nodes in the graph. When a link goes to a page on the same site which does not exist, the node is marked as unresolved.

{
"renderUnresolved": true
}

Render External Nodes

The renderExternal option toggles the rendering of external nodes in the graph. External nodes are links to pages on other sites.

{
"renderExternal": true
}

Node Styles

In the site graph plugin, there are 6 types of nodes that can exist in the graph:

  1. Default (base style)
  2. External (nodes refers to pages on other sites)
  3. Visited (user has visited the page)
  4. Tags (node is a tag)
  5. Current (current page)
  6. Unresolved (node refers to a page that does not exist)

Each node type can be individually styled using their own style. Also, each subsequent style inherits from the previous style in the list.

An example: a node can be both visited as well as current at the same time, the final style for this node will thus be determined as:

  1. Styles specified by current style
  2. Styles specified by visited style
  3. Styles specified by default style

For information about how these node styles can be configured, see the node style page.

Default

nodeDefaultStyle is a style applied to all nodes in the graph, each other style applied to a node, overrides this style.

{
"nodeDefaultStyle": {
"shape": "circle",
"shapePoints": 0,
"shapeSize": 10,
"shapeColor": "nodeColor",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 0,
"strokeColor": "inherit",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 1,
"neighborScale": 1
}
}
nodeDefaultStyle

External

nodeExternalStyle is a style applied to nodes that refer to pages on other sites. External nodes only appear if the renderExternal option is enabled in the graph config.

{
"nodeExternalStyle": {
"shape": "square",
"shapePoints": 0,
"shapeSize": 10,
"shapeColor": "nodeColorExternal",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 0,
"strokeColor": "inherit",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 0.8,
"neighborScale": 1
}
}
nodeDefaultStyle
nodeExternalStyle

Visited

nodeVisitedStyle is a style applied to nodes corresponding to pages that have been visited by the user. Visited nodes only appear if the trackVisitedPages option is enabled in the general config.

{
"nodeVisitedStyle": {
"shape": "circle",
"shapePoints": 0,
"shapeSize": 10,
"shapeColor": "nodeColorVisited",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 0,
"strokeColor": "inherit",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 1,
"neighborScale": 1
}
}
nodeDefaultStyle
nodeVisitedStyle

Tags

tagDefaultStyle is the default style for tags in the graph. Tags are pseudo-nodes that are created when a page has tags (either via frontmatter or tagRules).

{
"tagDefaultStyle": {
"shape": "circle",
"shapePoints": 0,
"shapeSize": 6,
"shapeColor": "backgroundColor",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 1,
"strokeColor": "nodeColorTag",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 1,
"neighborScale": 0.7
},
"tagRenderMode": "node"
}
nodeDefaultStyle
tagDefaultStyle

Current

nodeCurrentStyle defines the style for the current node in the graph. The current node corresponds to the page that the user is currently viewing.

{
"nodeCurrentStyle": {
"shape": "circle",
"shapePoints": 0,
"shapeSize": 10,
"shapeColor": "nodeColorCurrent",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 0,
"strokeColor": "inherit",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 1,
"neighborScale": 1
}
}
nodeDefaultStyle
nodeCurrentStyle

Unresolved

nodeUnresolvedStyle is the style applied to nodes that refer to pages that do not exist. Unresolved nodes only appear if the renderUnresolved option is enabled in the graph config.

{
"nodeUnresolvedStyle": {
"shape": "circle",
"shapePoints": 0,
"shapeSize": 10,
"shapeColor": "nodeColorUnresolved",
"shapeRotation": 0,
"shapeCornerRadius": "0%",
"strokeWidth": 0,
"strokeColor": "inherit",
"strokeCornerRadius": "0%",
"cornerType": "normal",
"colliderScale": 1,
"nodeScale": 1,
"neighborScale": 1
}
}
nodeDefaultStyle
nodeUnresolvedStyle