|
1 | 1 | // @ts-check |
2 | | -import { defineConfig } from 'astro/config'; |
3 | | -import starlight from '@astrojs/starlight'; |
4 | | -import tailwind from '@astrojs/tailwind'; |
5 | | -import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi' |
| 2 | +import { defineConfig } from "astro/config"; |
| 3 | +import starlight from "@astrojs/starlight"; |
| 4 | +import tailwindcss from "@tailwindcss/vite"; |
| 5 | +import starlightOpenAPI, { openAPISidebarGroups } from "starlight-openapi"; |
6 | 6 |
|
7 | | -import vercel from '@astrojs/vercel'; |
| 7 | +import vercel from "@astrojs/vercel"; |
8 | 8 |
|
9 | 9 | // https://astro.build/config |
10 | 10 | export default defineConfig({ |
11 | 11 | site: 'https://aptos.dev', |
12 | 12 | integrations: [ |
13 | | - starlight({ |
14 | | - title: 'Aptos Docs', |
15 | | - social: { |
16 | | - github: 'https://github.com/aptos-labs/', |
| 13 | + starlight({ |
| 14 | + title: "Aptos Docs", |
| 15 | + social: { |
| 16 | + github: "https://github.com/aptos-labs/", |
| 17 | + }, |
| 18 | + components: { |
| 19 | + // Override the default `Head` component. |
| 20 | + PageFrame: "./src/components/PageFrame.astro", |
| 21 | + }, |
| 22 | + plugins: [ |
| 23 | + // Generate the OpenAPI documentation pages. |
| 24 | + starlightOpenAPI( |
| 25 | + [ |
| 26 | + { |
| 27 | + base: "api", |
| 28 | + label: "API", |
| 29 | + schema: "./aptos-spec.json", |
| 30 | + sidebarMethodBadges: true, |
| 31 | + }, |
| 32 | + ], |
| 33 | + { |
| 34 | + routeEntrypoint: "./src/components/OpenAPI/Route.astro", |
17 | 35 | }, |
18 | | - components: { |
19 | | - // Override the default `Head` component. |
20 | | - PageFrame: './src/components/PageFrame.astro', |
21 | | - }, |
22 | | - plugins: [ |
23 | | - // Generate the OpenAPI documentation pages. |
24 | | - starlightOpenAPI([ |
25 | | - { |
26 | | - base: 'api', |
27 | | - label: 'API', |
28 | | - schema: './aptos-spec.json', |
29 | | - sidebarMethodBadges: true, |
30 | | - }, |
31 | | - ], { |
32 | | - routeEntrypoint: './src/components/OpenAPI/Route.astro' |
33 | | - }), |
34 | | - ], |
35 | | - sidebar: [ |
36 | | - { |
37 | | - label: 'Guides', |
38 | | - items: [ |
39 | | - // Each item here is one entry in the navigation menu. |
40 | | - { label: 'Example Guide', slug: 'guides/example' }, |
41 | | - ], |
42 | | - }, |
43 | | - { |
44 | | - label: 'Reference', |
45 | | - autogenerate: { directory: 'reference' }, |
46 | | - }, |
47 | | - ...openAPISidebarGroups, |
| 36 | + ), |
| 37 | + ], |
| 38 | + sidebar: [ |
| 39 | + { |
| 40 | + label: "Guides", |
| 41 | + items: [ |
| 42 | + // Each item here is one entry in the navigation menu. |
| 43 | + { label: "Example Guide", slug: "guides/example" }, |
48 | 44 | ], |
49 | | - customCss: ['./src/tailwind.css'], |
50 | | - }), |
51 | | - tailwind({ applyBaseStyles: false }), |
52 | | - ], |
53 | | - |
| 45 | + }, |
| 46 | + { |
| 47 | + label: "Reference", |
| 48 | + autogenerate: { directory: "reference" }, |
| 49 | + }, |
| 50 | + ...openAPISidebarGroups, |
| 51 | + ], |
| 52 | + customCss: ["./src/globals.css"], |
| 53 | + }), |
| 54 | + ], |
54 | 55 | adapter: vercel(), |
| 56 | + vite: { |
| 57 | + plugins: [tailwindcss()], |
| 58 | + }, |
55 | 59 | }); |
0 commit comments