astro.config.mjs 1.8 KB

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