| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- // @ts-check
- import { defineConfig } from "astro/config"
- import starlight from "@astrojs/starlight"
- import solidJs from "@astrojs/solid-js"
- import cloudflare from "@astrojs/cloudflare"
- import theme from "toolbeam-docs-theme"
- import config from "./config.mjs"
- import { rehypeHeadingIds } from "@astrojs/markdown-remark"
- import rehypeAutolinkHeadings from "rehype-autolink-headings"
- const url = "https://opencode.ai"
- const github = "https://github.com/sst/opencode"
- // https://astro.build/config
- export default defineConfig({
- site: url,
- output: "server",
- adapter: cloudflare({
- imageService: "passthrough",
- }),
- devToolbar: {
- enabled: false,
- },
- markdown: {
- rehypePlugins: [
- rehypeHeadingIds,
- [rehypeAutolinkHeadings, { behavior: "wrap" }],
- ],
- },
- integrations: [
- solidJs(),
- starlight({
- title: "opencode",
- expressiveCode: { themes: ["github-light", "github-dark"] },
- social: [
- { icon: "github", label: "GitHub", href: config.github },
- ],
- head: [
- {
- tag: "link",
- attrs: {
- rel: "icon",
- href: "/favicon.svg",
- },
- },
- {
- tag: "meta",
- attrs: {
- property: "og:image",
- content: `${url}/social-share.png`,
- },
- },
- {
- tag: "meta",
- attrs: {
- property: "twitter:image",
- content: `${url}/social-share.png`,
- },
- },
- ],
- editLink: {
- baseUrl: `${github}/edit/master/www/`,
- },
- markdown: {
- headingLinks: false,
- },
- customCss: ["./src/styles/custom.css"],
- logo: {
- light: "./src/assets/logo-light.svg",
- dark: "./src/assets/logo-dark.svg",
- replacesTitle: true,
- },
- sidebar: [
- "docs",
- "docs/cli",
- "docs/config",
- "docs/agents",
- "docs/models",
- "docs/themes",
- "docs/keybinds",
- "docs/mcp-servers",
- ],
- components: {
- Hero: "./src/components/Hero.astro",
- Header: "./src/components/Header.astro",
- },
- plugins: [
- theme({
- headerLinks: config.headerLinks,
- }),
- ],
- }),
- ],
- })
|