1
0

astro.config.mjs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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: 'Framework Routes', slug: 'guides/framework-routes' },
  77. { label: 'Affected Tests in CI', slug: 'guides/affected-tests' },
  78. ],
  79. },
  80. {
  81. label: 'Reference',
  82. items: [
  83. { label: 'MCP Server', slug: 'reference/mcp-server' },
  84. { label: 'Integrations', slug: 'reference/integrations' },
  85. { label: 'CLI', slug: 'reference/cli' },
  86. { label: 'API', slug: 'reference/api' },
  87. { label: 'Languages', slug: 'reference/languages' },
  88. ],
  89. },
  90. { label: 'Troubleshooting', slug: 'troubleshooting' },
  91. ],
  92. }),
  93. ],
  94. });