Skip to content

Overview

The pages below detail how you can configure the theme to suit your needs. In general, you can configure the underlying Starlight Site Graph in several ways:

  1. Configuration via Plugin settings: You can configure the plugin by passing options.
    See Starlight Site Graph Settings.
    (this is the most common way to configure the plugin)
    astro.config.mjs
    import starlight from '@astrojs/starlight'
    import { defineConfig } from 'astro/config'
    import starlightSiteGraph from 'starlight-site-graph'
    export default defineConfig({
    integrations: [
    starlight({
    plugins: [starlightSiteGraph({
    debug: false, // See "General Settings"
    sitemapCongig: {}, // See "Sitemap Settings"
    graphConfig: {}, // See "Graph Settings"
    backlinksConfig: {}, // See "Backlinks Settings"
    })],
    }),
    ],
    })
  2. Configuration via Frontmatter: You can configure the plugin by specifying frontmatter to your markdown files, this overrides the regular plugin settings.
    See Frontmatter Configuration.
    src/content/docs/my-page.md
    ---
    title: My Page
    links: [], // See "Frontmatter Configuration - Sitemap"
    tags: [], // ...
    sitemap: ... // ...
    graph: ... // See "Frontmatter Configuration - Graph"
    backlinks: ... // See "Frontmatter Configuration - Backlinks"
    ---
    My page content goes here!
  3. Configuration via CSS: You can configure the appearance of the theme and its components using CSS.
    See CSS Configuration.
    src/styles/global.css
    :root[data-theme='dark'] {
    --slsg-node-color: red; /* See "CSS Configuration - Variables" */
    }
    :root[data-theme='light'] {
    --slsg-node-color: blue;
    }
    .graph-component {
    /* Any CSS */
    }

Configuration Pages