-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro.config.mjs
45 lines (42 loc) · 1.18 KB
/
astro.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { defineConfig } from "astro/config"
import starlight from "@astrojs/starlight"
import { generateAPI } from "starlight-openapi"
// Generate the documentation and get the associated sidebar groups.
const { openAPISidebarGroups, starlightOpenAPI } = await generateAPI([
{
base: "api",
label: "API Reference",
schema: process.env.API_SCHEMA ?? "./schemas/public.json",
},
])
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: "Eventpop API Documentation",
social: {
github: "https://github.com/eventpop",
},
sidebar: [
// {
// label: "Guides",
// items: [
// // Each item here is one entry in the navigation menu.
// { label: "Getting Started", link: "/guides/getting-started" },
// ],
// },
{
label: "Guides",
autogenerate: { directory: "guides" },
},
// {
// label: "Reference",
// autogenerate: { directory: "reference" },
// },
...openAPISidebarGroups,
],
}),
// Add the Starlight OpenAPI integration.
starlightOpenAPI(),
],
})