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.

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.

{
"graphConfig": {
"renderUnresolved": true
}
}

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

{
"graphConfig": {
"renderExternal": true
}
}

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

  1. Default (node does not fall into any category)
  2. External (node refers to pages on other sites)
  3. Visited (user has visited the page)
  4. Tags (node contains a tag)
  5. Current (node corresponds to current page)
  6. Unresolved (node refers to a page that does not exist)

Each category applies a specific style to the node, and will override any styles define by categories that are of ‘lower priority’. The list above also gives the priority order of the different categories (where the unresolved style will override all other styles).

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, overrides visited and default
  2. Styles specified by visited style, overrides default
  3. Styles specified by default style

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

nodeDefaultStyle is a style applied to all nodes in the graph, any other style applied to a node will override this style.

{
"graphConfig": {
"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

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.

{
"graphConfig": {
"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
},
"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

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.

{
"graphConfig": {
"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
},
"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

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).

{
"graphConfig": {
"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
},
"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

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

{
"graphConfig": {
"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
},
"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

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.

{
"graphConfig": {
"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
},
"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