astro.config.mjs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // @ts-check
  2. import { defineConfig } from "astro/config";
  3. import starlight from "@astrojs/starlight";
  4. import solidJs from "@astrojs/solid-js";
  5. import theme from "toolbeam-docs-theme";
  6. import { rehypeHeadingIds } from "@astrojs/markdown-remark";
  7. import rehypeAutolinkHeadings from "rehype-autolink-headings";
  8. const discord = "https://discord.gg/sst";
  9. const github = "https://github.com/sst/opencode";
  10. // https://astro.build/config
  11. export default defineConfig({
  12. devToolbar: {
  13. enabled: false,
  14. },
  15. markdown: {
  16. rehypePlugins: [
  17. rehypeHeadingIds,
  18. [rehypeAutolinkHeadings, { behavior: "wrap" }],
  19. ],
  20. },
  21. integrations: [
  22. solidJs(),
  23. starlight({
  24. title: "OpenCode",
  25. social: [
  26. { icon: "discord", label: "Discord", href: discord },
  27. { icon: "github", label: "GitHub", href: github },
  28. ],
  29. editLink: {
  30. baseUrl: `${github}/edit/master/www/`,
  31. },
  32. markdown: {
  33. headingLinks: false,
  34. },
  35. logo: {
  36. light: "./src/assets/logo-light.svg",
  37. dark: "./src/assets/logo-dark.svg",
  38. replacesTitle: true,
  39. },
  40. sidebar: [
  41. "docs",
  42. "docs/cli",
  43. "docs/config",
  44. "docs/models",
  45. "docs/themes",
  46. "docs/shortcuts",
  47. "docs/lsp-servers",
  48. "docs/mcp-servers",
  49. ],
  50. components: {
  51. Hero: "./src/components/Hero.astro",
  52. Header: "./src/components/Header.astro",
  53. },
  54. plugins: [theme({
  55. // Optionally, add your own header links
  56. headerLinks: [
  57. { name: "Home", url: "/" },
  58. { name: "Docs", url: "/docs/" },
  59. ],
  60. })],
  61. }),
  62. ],
  63. });