astro.config.mjs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. customCss: [
  36. "./src/styles/custom.css",
  37. ],
  38. logo: {
  39. light: "./src/assets/logo-light.svg",
  40. dark: "./src/assets/logo-dark.svg",
  41. replacesTitle: true,
  42. },
  43. sidebar: [
  44. "docs",
  45. "docs/cli",
  46. "docs/config",
  47. "docs/models",
  48. "docs/themes",
  49. "docs/shortcuts",
  50. "docs/lsp-servers",
  51. "docs/mcp-servers",
  52. ],
  53. components: {
  54. Hero: "./src/components/Hero.astro",
  55. Header: "./src/components/Header.astro",
  56. },
  57. plugins: [theme({
  58. // Optionally, add your own header links
  59. headerLinks: [
  60. { name: "Home", url: "/" },
  61. { name: "Docs", url: "/docs/" },
  62. ],
  63. })],
  64. }),
  65. ],
  66. });