|
| 1 | +import theme from "toolbeam-docs-theme" |
| 2 | +import starlight from "@astrojs/starlight" |
| 3 | +import { defineConfig } from "astro/config" |
| 4 | +import { rehypeHeadingIds } from "@astrojs/markdown-remark" |
| 5 | +import rehypeAutolinkHeadings from "rehype-autolink-headings" |
| 6 | +import config from "./config" |
| 7 | + |
| 8 | +const url = "https://opencontrol.ai" |
| 9 | + |
| 10 | +// https://astro.build/config |
| 11 | +export default defineConfig({ |
| 12 | + site: url, |
| 13 | + trailingSlash: 'always', |
| 14 | + devToolbar: { |
| 15 | + enabled: false, |
| 16 | + }, |
| 17 | + integrations: [ |
| 18 | + starlight({ |
| 19 | + plugins: [theme()], |
| 20 | + title: "OpenControl", |
| 21 | + description: "Self-hosted AI context protocol gateway.", |
| 22 | + head: [ |
| 23 | + { |
| 24 | + tag: "link", |
| 25 | + attrs: { |
| 26 | + rel: "icon", |
| 27 | + href: "/favicon.ico", |
| 28 | + sizes: "48x48", |
| 29 | + }, |
| 30 | + }, |
| 31 | + // Add light/dark mode favicon |
| 32 | + { |
| 33 | + tag: "link", |
| 34 | + attrs: { |
| 35 | + rel: "icon", |
| 36 | + href: "/favicon.svg", |
| 37 | + media: "(prefers-color-scheme: light)", |
| 38 | + }, |
| 39 | + }, |
| 40 | + { |
| 41 | + tag: "link", |
| 42 | + attrs: { |
| 43 | + rel: "icon", |
| 44 | + href: "/favicon-dark.svg", |
| 45 | + media: "(prefers-color-scheme: dark)", |
| 46 | + }, |
| 47 | + }, |
| 48 | + { |
| 49 | + tag: "meta", |
| 50 | + attrs: { |
| 51 | + property: "og:image", |
| 52 | + content: `${url}/social-share.png`, |
| 53 | + }, |
| 54 | + }, |
| 55 | + { |
| 56 | + tag: "meta", |
| 57 | + attrs: { |
| 58 | + property: "twitter:image", |
| 59 | + content: `${url}/social-share.png`, |
| 60 | + }, |
| 61 | + }, |
| 62 | + ], |
| 63 | + logo: { |
| 64 | + light: "./src/assets/logo-light.svg", |
| 65 | + dark: "./src/assets/logo-dark.svg", |
| 66 | + replacesTitle: true, |
| 67 | + }, |
| 68 | + social: { |
| 69 | + github: config.github, |
| 70 | + discord: config.discord, |
| 71 | + }, |
| 72 | + lastUpdated: true, |
| 73 | + editLink: { |
| 74 | + baseUrl: `${config.github}/edit/master/www/`, |
| 75 | + }, |
| 76 | + components: { |
| 77 | + Hero: "./src/components/Hero.astro", |
| 78 | + }, |
| 79 | + customCss: [ |
| 80 | + "./src/custom.css", |
| 81 | + "./src/styles/lander.css", |
| 82 | + ], |
| 83 | + sidebar: [ |
| 84 | + { label: "Intro", slug: "docs" }, |
| 85 | + ], |
| 86 | + }), |
| 87 | + ], |
| 88 | + markdown: { |
| 89 | + rehypePlugins: [ |
| 90 | + rehypeHeadingIds, |
| 91 | + [rehypeAutolinkHeadings, { behavior: "wrap" }], |
| 92 | + ], |
| 93 | + }, |
| 94 | +}) |
0 commit comments