adding docs site
This commit is contained in:
63
www/astro.config.mjs
Normal file
63
www/astro.config.mjs
Normal file
@@ -0,0 +1,63 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
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: [
|
||||
starlight({
|
||||
title: "OpenCode",
|
||||
social: [
|
||||
{ icon: "discord", label: "Discord", href: discord },
|
||||
{ icon: "github", label: "GitHub", href: github },
|
||||
],
|
||||
editLink: {
|
||||
baseUrl: `${github}/edit/master/www/`,
|
||||
},
|
||||
logo: {
|
||||
light: "./src/assets/logo-light.svg",
|
||||
dark: "./src/assets/logo-dark.svg",
|
||||
replacesTitle: true,
|
||||
},
|
||||
sidebar: [
|
||||
{
|
||||
label: "Guides",
|
||||
items: [
|
||||
// Each item here is one entry in the navigation menu.
|
||||
{ label: "Example Guide", slug: "guides/example" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Reference",
|
||||
autogenerate: { directory: "reference" },
|
||||
},
|
||||
],
|
||||
components: {
|
||||
Hero: "./src/components/Hero.astro",
|
||||
},
|
||||
plugins: [theme({
|
||||
// Optionally, add your own header links
|
||||
headerLinks: [
|
||||
{ name: "Home", url: "/" },
|
||||
{ name: "Docs", url: "/docs/" },
|
||||
{ name: "Blog", url: "/blog/" },
|
||||
],
|
||||
})],
|
||||
}),
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user