|
| 1 | +// @ts-check |
| 2 | +import { defineConfig } from 'astro/config'; |
| 3 | +import starlight from '@astrojs/starlight'; |
| 4 | +import { sectionSidebarPlugin } from './src/plugins/section-sidebar.plugin'; |
| 5 | +import netlify from '@astrojs/netlify'; |
| 6 | +import linkValidator from 'starlight-links-validator'; |
| 7 | +import react from '@astrojs/react'; |
| 8 | +import markdoc from '@astrojs/markdoc'; |
| 9 | + |
| 10 | +// https://astro.build/config |
| 11 | +export default defineConfig({ |
| 12 | + integrations: [ |
| 13 | + markdoc(), |
| 14 | + starlight({ |
| 15 | + title: 'Nx', |
| 16 | + tagline: |
| 17 | + 'An AI-first build platform that connects everything from your editor to CI. Helping you deliver fast, without breaking things.', |
| 18 | + favicon: '/favicon.svg', |
| 19 | + logo: { |
| 20 | + src: './src/assets/nx/Nx-light.png', |
| 21 | + replacesTitle: true, |
| 22 | + }, |
| 23 | + plugins: [ |
| 24 | + // linkValidator(), |
| 25 | + sectionSidebarPlugin(), |
| 26 | + ], |
| 27 | + routeMiddleware: ['./src/plugins/banner.middleware.ts'], |
| 28 | + markdown: { |
| 29 | + // this breaks the renderMarkdown function in the plugin loader due to starlight path normalization |
| 30 | + // as to _why_ it has to normalize a path? |
| 31 | + // idk just working around the issue for now but we'll want to have linked headers so will need to fix |
| 32 | + headingLinks: false, |
| 33 | + }, |
| 34 | + social: [ |
| 35 | + { icon: 'github', label: 'GitHub', href: 'https://github.com/nrwl/nx' }, |
| 36 | + { |
| 37 | + icon: 'youtube', |
| 38 | + label: 'YouTube', |
| 39 | + href: 'https://www.youtube.com/@NxDevtools?utm_source=nx.dev', |
| 40 | + }, |
| 41 | + { |
| 42 | + icon: 'x.com', |
| 43 | + label: 'X', |
| 44 | + href: 'https://x.com/NxDevTools?utm_source=nx.dev', |
| 45 | + }, |
| 46 | + { |
| 47 | + icon: 'discord', |
| 48 | + label: 'Discord', |
| 49 | + href: 'https://go.nx.dev/community', |
| 50 | + }, |
| 51 | + ], |
| 52 | + editLink: { |
| 53 | + baseUrl: 'https://github.com/nrwl/nx/tree/main/', |
| 54 | + }, |
| 55 | + customCss: ['./src/styles/custom.css'], |
| 56 | + sidebar: [ |
| 57 | + { |
| 58 | + label: 'Getting Started', |
| 59 | + autogenerate: { directory: 'getting-started' }, |
| 60 | + }, |
| 61 | + { |
| 62 | + label: 'Guides', |
| 63 | + autogenerate: { directory: 'guides' }, |
| 64 | + }, |
| 65 | + { |
| 66 | + label: 'Concepts', |
| 67 | + autogenerate: { directory: 'concepts' }, |
| 68 | + }, |
| 69 | + { |
| 70 | + label: 'References', |
| 71 | + collapsed: true, |
| 72 | + items: [ |
| 73 | + // have to use link bc slug is mapped to the /docs/ folder but we need the astro component in the pages/ dir |
| 74 | + { label: 'Nx CLI', link: 'api/nx-cli' }, |
| 75 | + { label: 'Nx Cloud CLI', slug: 'api/nx-cloud-cli' }, |
| 76 | + { label: 'create-nx-workspace', link: 'api/create-nx-workspace' }, |
| 77 | + { |
| 78 | + label: 'devkit', |
| 79 | + collapsed: true, |
| 80 | + items: [ |
| 81 | + { label: 'Overview', link: 'api/plugins/devkit/' }, |
| 82 | + { |
| 83 | + label: 'Ng CLI Adapter', |
| 84 | + link: 'api/plugins/devkit/ngcli_adapter', |
| 85 | + }, |
| 86 | + ], |
| 87 | + }, |
| 88 | + // plugins are autogenerated from the Nx repository via the sidebar plugin |
| 89 | + ], |
| 90 | + }, |
| 91 | + ], |
| 92 | + }), |
| 93 | + react(), |
| 94 | + ], |
| 95 | + site: 'https://docs.nx.dev', |
| 96 | + adapter: netlify(), |
| 97 | +}); |
0 commit comments