Fevol / starlight-site-graph

Starlight plugin adding a graph component to the site's right-sidebar
https://fevol.github.io/starlight-site-graph/
MIT License
13 stars 0 forks source link
astro component graph plugin starlight visualization


Starlight Site Graph downloads - weekly GitHub Repo stars GitHub Workflow Status GitHub release (latest by date including pre-releases)
Astro Starlight

GET STARTED  ยท  WEBSITE  ยท  CONFIGURATION


A package/plugin for Starlight and Astro which allows you to add a graph to your website, visualizing connections between pages.




๐Ÿ“‘ Table of Contents


๐Ÿงฐ Set-up

You can install this package from npm from your favourite package manager:

npm install starlight-site-graph

If you are using Starlight, you can just add the following to your astro.config.mjs:

// 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({ ... })],
            title: 'My Docs',
        }),
    ],
})

If you are just using Astro, you will instead need to register it as follows:

// astro.config.mjs
import sitegraphSitemapIntegration from 'starlight-site-graph/integration';
import { defineConfig } from 'astro/config'
export default defineConfig({
    prefetch: true,
    integrations: [
      // ...
      sitegraphSitemapIntegration({ ... })
    ]
})

For more information, check out the Getting Started guide.

๐Ÿ’ฌ Discussion and Feedback

Any feedback would very much be appreciated. Please use the GitHub issue tracker to report bugs, request features, or suggest improvements, or message me over on Discord (@fevol).


๐Ÿ’Ž Acknowledgements

This plugin makes use of existing projects such as:

And was originally inspired by Quartz's graph component.

This README makes use of shields.io for adding badges to display some cursory information about the project.


๐Ÿค Contributors

mProjectsCode - For making large improvements to the graph's rendering logic and fixing many bugs.
HiDeoo and Delucis - For helping me to figure out how to solve some of the more difficult problems I encountered, and giving many helpful suggestions on how to improve the project.


โค๏ธ Support

If you like this project, please consider giving it a star on GitHub, contributing some code, or sponsoring me via GitHub Sponsors.