Created
June 25, 2025 18:02
-
-
Save Ellisande/4fa6fd8f56e5090c4f1fe18394da8a74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
import { defineConfig } from "astro/config"; | |
import starlight from "@astrojs/starlight"; | |
import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi"; | |
const schemaUrl = | |
process.env.NODE_ENV === "production" | |
? "https://demo.api.string-theory.finance/api" | |
: "http://localhost:8000/api"; | |
// https://astro.build/config | |
export default defineConfig({ | |
server: { | |
port: 5000, | |
}, | |
integrations: [ | |
starlight({ | |
customCss: ["./src/styles/theme.css"], | |
title: "String Theory", | |
social: [], | |
favicon: "favicon.svg", | |
plugins: [ | |
// Generate the OpenAPI documentation pages. | |
starlightOpenAPI([ | |
{ | |
base: "api", | |
schema: schemaUrl, | |
sidebar: { | |
label: "API", | |
operations: { | |
labels: "operationId", | |
sort: "document", | |
}, | |
}, | |
}, | |
]), | |
], | |
sidebar: [ | |
{ | |
label: "Blog", | |
items: [ | |
{ | |
label: "The Attribution Problem", | |
link: "/blog/attribution-problem", | |
}, | |
{ | |
label: "Deterministic Attribution", | |
link: "/blog/deterministic-attribution", | |
}, | |
{ | |
label: "The Single Context Problem", | |
link: "/blog/single-context-problem", | |
}, | |
{ | |
label: "Sticky Context", | |
link: "/blog/sticky-context", | |
}, | |
{ | |
label: "The Zero Sum Fallacy", | |
link: "/blog/zero-sum", | |
}, | |
], | |
}, | |
{ | |
label: "Concepts", | |
autogenerate: { directory: "concepts" }, | |
}, | |
...openAPISidebarGroups, | |
], | |
}), | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment