summaryrefslogtreecommitdiffhomepage
path: root/app/packages/web/astro.config.mjs
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-05-26 17:25:06 -0400
committerJay V <[email protected]>2025-05-26 17:25:12 -0400
commit66b18959ebc7b699a74ce69d3adfb4c4dcaa5fd1 (patch)
tree5ef9340b1c496076dd1e12156fdc35c3f3c35933 /app/packages/web/astro.config.mjs
parentdeacf5991abfb777aae7823a8e7e352fbefdabd0 (diff)
downloadopencode-66b18959ebc7b699a74ce69d3adfb4c4dcaa5fd1.tar.gz
opencode-66b18959ebc7b699a74ce69d3adfb4c4dcaa5fd1.zip
Merging docs and share app
Diffstat (limited to 'app/packages/web/astro.config.mjs')
-rw-r--r--app/packages/web/astro.config.mjs65
1 files changed, 65 insertions, 0 deletions
diff --git a/app/packages/web/astro.config.mjs b/app/packages/web/astro.config.mjs
new file mode 100644
index 000000000..78ddcdea8
--- /dev/null
+++ b/app/packages/web/astro.config.mjs
@@ -0,0 +1,65 @@
+// @ts-check
+import { defineConfig } from "astro/config";
+import starlight from "@astrojs/starlight";
+import solidJs from "@astrojs/solid-js";
+import theme from "toolbeam-docs-theme";
+import { rehypeHeadingIds } from "@astrojs/markdown-remark";
+import rehypeAutolinkHeadings from "rehype-autolink-headings";
+
+const discord = "https://discord.gg/sst";
+const github = "https://github.com/sst/opencode";
+
+// https://astro.build/config
+export default defineConfig({
+ devToolbar: {
+ enabled: false,
+ },
+ markdown: {
+ rehypePlugins: [
+ rehypeHeadingIds,
+ [rehypeAutolinkHeadings, { behavior: "wrap" }],
+ ],
+ },
+ integrations: [
+ solidJs(),
+ starlight({
+ title: "OpenCode",
+ social: [
+ { icon: "discord", label: "Discord", href: discord },
+ { icon: "github", label: "GitHub", href: github },
+ ],
+ editLink: {
+ baseUrl: `${github}/edit/master/www/`,
+ },
+ markdown: {
+ headingLinks: false,
+ },
+ logo: {
+ light: "./src/assets/logo-light.svg",
+ dark: "./src/assets/logo-dark.svg",
+ replacesTitle: true,
+ },
+ sidebar: [
+ "docs",
+ "docs/cli",
+ "docs/config",
+ "docs/models",
+ "docs/themes",
+ "docs/shortcuts",
+ "docs/lsp-servers",
+ "docs/mcp-servers",
+ ],
+ components: {
+ Hero: "./src/components/Hero.astro",
+ Header: "./src/components/Header.astro",
+ },
+ plugins: [theme({
+ // Optionally, add your own header links
+ headerLinks: [
+ { name: "Home", url: "/" },
+ { name: "Docs", url: "/docs/" },
+ ],
+ })],
+ }),
+ ],
+});