fix(docs): make the Starlight build pass
## Changes - Bump @astrojs/starlight to ^0.32.0 so starlight-openapi 0.13's plugin contract (top-level setup hook) is supported - Replace the no-arg docsLoader call with Astro's glob loader pointing at ../api-content so prose stays outside the Astro project tree - Rename introduction.md → index.md and update the sidebar slug so the /docs/ root resolves instead of returning 404 - Commit package-lock.json so Vercel installs deterministically ## Verification - npm run build produces 96 pages (7 narrative + 88 OpenAPI operations + 1 releases timeline) - /docs/, /docs/releases/, /docs/api-reference/operations/authlogin/ and every other route return 200 locally - 14 release cards render with the brand-green "Latest" badge on v3.7.1
This commit is contained in:
1 parent
e69f40fdd0
commit
0d25973efb
5 files changed
+7997
-4
No files matched your search
@@ -1,13 +1,23 @@
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsLoader } from "@astrojs/starlight/loaders";
|
||||
import { glob } from "astro/loaders";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
|
||||
// Load markdown from a sibling folder so prose lives outside the Astro
|
||||
// project tree. Contributors edit /docs/api-content/*.md without touching
|
||||
// the build tool.
|
||||
//
|
||||
// Starlight's built-in docsLoader is hardcoded to src/content/docs/, so we
|
||||
// use Astro's plain glob loader with a custom base and apply Starlight's
|
||||
// schema on top. The collection name must remain "docs" — Starlight looks
|
||||
// it up by that exact name.
|
||||
export const collections = {
|
||||
docs: defineCollection({
|
||||
loader: docsLoader({ base: "../api-content" }),
|
||||
loader: glob({
|
||||
base: "../api-content",
|
||||
// README is contributor-facing docs (how to build the site),
|
||||
// not part of the published content.
|
||||
pattern: ["**/[^_]*.{md,mdx}", "!README.md"],
|
||||
}),
|
||||
schema: docsSchema(),
|
||||
}),
|
||||
};
|
||||
Reference in new issue
Block a user