diff --git a/apps/website/astro.config.mjs b/apps/website/astro.config.mjs index 1ba02d9..623198f 100644 --- a/apps/website/astro.config.mjs +++ b/apps/website/astro.config.mjs @@ -1,5 +1,6 @@ import starlight from '@astrojs/starlight' import { defineConfig } from 'astro/config' +import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi' export default defineConfig({ outDir: '../../build/website', @@ -25,11 +26,22 @@ export default defineConfig({ label: 'Guides', items: [{ label: 'Getting started', slug: 'guides/getting-started' }], }, + ...openAPISidebarGroups, // { // label: 'Reference', // autogenerate: { directory: 'reference' }, // }, ], + plugins: [ + // Generate the OpenAPI documentation pages. + starlightOpenAPI([ + { + base: 'api', + label: 'API', + schema: 'https://api.boring.tools/openapi.json', + }, + ]), + ], }), ], }) diff --git a/apps/website/package.json b/apps/website/package.json index b3b4449..35cb50d 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -10,10 +10,11 @@ "astro": "astro" }, "dependencies": { + "@astrojs/check": "^0.9.3", "@astrojs/starlight": "^0.28.2", "astro": "^4.15.3", "sharp": "^0.32.5", - "@astrojs/check": "^0.9.3", + "starlight-openapi": "^0.7.0", "typescript": "^5.6.2" } } diff --git a/bun.lockb b/bun.lockb index 6f22788..a423344 100755 Binary files a/bun.lockb and b/bun.lockb differ