astro.config.mjs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. // @ts-check
  2. import { defineConfig } from 'astro/config';
  3. import starlight from '@astrojs/starlight';
  4. // Project page on GitHub Pages: https://colbymchenry.github.io/codegraph/
  5. // `site` + `base` make every internal link resolve under the /codegraph/ prefix.
  6. export default defineConfig({
  7. site: 'https://colbymchenry.github.io',
  8. base: '/codegraph',
  9. integrations: [
  10. starlight({
  11. title: 'codegraph',
  12. description:
  13. 'A local-first code-intelligence tool that turns any codebase into a queryable knowledge graph for AI coding agents.',
  14. favicon: '/favicon.svg',
  15. head: [
  16. {
  17. // Default to the light / paper theme on first visit; the toggle still
  18. // lets a visitor switch to (and persist) the dark / ink theme.
  19. tag: 'script',
  20. content:
  21. "if(!localStorage.getItem('starlight-theme')){try{localStorage.setItem('starlight-theme','light')}catch(e){}document.documentElement.dataset.theme='light';document.documentElement.style.colorScheme='light'}",
  22. },
  23. ],
  24. social: [
  25. {
  26. icon: 'github',
  27. label: 'GitHub',
  28. href: 'https://github.com/colbymchenry/codegraph',
  29. },
  30. ],
  31. customCss: [
  32. '@fontsource-variable/archivo',
  33. '@fontsource/ibm-plex-mono/400.css',
  34. '@fontsource/ibm-plex-mono/500.css',
  35. '@fontsource/ibm-plex-mono/600.css',
  36. './src/styles/theme.css',
  37. ],
  38. components: {
  39. // Wordmark in the docs header.
  40. SiteTitle: './src/components/SiteTitle.astro',
  41. // Default GitHub icon + a live star-count pill (matches the landing nav).
  42. SocialIcons: './src/components/SocialIcons.astro',
  43. },
  44. expressiveCode: {
  45. themes: ['github-light', 'github-dark'],
  46. styleOverrides: {
  47. borderRadius: '0px',
  48. borderColor: '#cdcabf',
  49. codeFontFamily: "'IBM Plex Mono', ui-monospace, monospace",
  50. },
  51. },
  52. sidebar: [
  53. {
  54. label: 'Getting Started',
  55. items: [
  56. { label: 'Introduction', slug: 'getting-started/introduction' },
  57. { label: 'Quickstart', slug: 'getting-started/quickstart' },
  58. { label: 'Installation', slug: 'getting-started/installation' },
  59. { label: 'Configuration', slug: 'getting-started/configuration' },
  60. { label: 'Your First Graph', slug: 'getting-started/your-first-graph' },
  61. { label: 'Next Steps', slug: 'getting-started/next-steps' },
  62. ],
  63. },
  64. {
  65. label: 'Core Concepts',
  66. items: [
  67. { label: 'How It Works', slug: 'core-concepts/how-it-works' },
  68. { label: 'The Knowledge Graph', slug: 'core-concepts/knowledge-graph' },
  69. { label: 'Resolution & Frameworks', slug: 'core-concepts/resolution' },
  70. ],
  71. },
  72. {
  73. label: 'Guides',
  74. items: [
  75. { label: 'Indexing a Project', slug: 'guides/indexing' },
  76. { label: 'Reading Your Graph in the Browser', slug: 'guides/viewer' },
  77. { label: 'Framework Routes', slug: 'guides/framework-routes' },
  78. { label: 'Affected Tests in CI', slug: 'guides/affected-tests' },
  79. ],
  80. },
  81. {
  82. label: 'Reference',
  83. items: [
  84. { label: 'MCP Server', slug: 'reference/mcp-server' },
  85. { label: 'Integrations', slug: 'reference/integrations' },
  86. { label: 'CLI', slug: 'reference/cli' },
  87. { label: 'API', slug: 'reference/api' },
  88. { label: 'Languages', slug: 'reference/languages' },
  89. ],
  90. },
  91. { label: 'Troubleshooting', slug: 'troubleshooting' },
  92. ],
  93. }),
  94. ],
  95. });