Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Astro site to support dedicated “Overview” (index.astro) pages for the Player/Framework reference sections, migrates the content collections configuration to the new src/content.config.ts format, and regenerates the built documentation output under docs/.
Changes:
- Add
index.astroroutes for/[lang]/reference/player/and/[lang]/reference/framework/and adjust[...slug].astroto skip language index entries. - Migrate content collections from
src/content/config.tstosrc/content.config.tsusingastro/loadersglob loaders. - Upgrade Astro and related dependencies, and update generated static docs in
docs/.
Reviewed changes
Copilot reviewed 13 out of 56 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/[lang]/reference/player/index.astro | New Player reference overview page rendering the language index content entry. |
| src/pages/[lang]/reference/player/[...slug].astro | Updates reference routing to skip index entries and uses render() from astro:content. |
| src/pages/[lang]/reference/framework/index.astro | New Framework reference overview page rendering the language index content entry. |
| src/pages/[lang]/reference/framework/[...slug].astro | Updates reference routing to skip index entries and uses render() from astro:content. |
| src/content/config.ts | Removes the legacy content collections configuration file. |
| src/content.config.ts | Adds new loader-based collections configuration for player/framework specs. |
| package.json | Bumps site/dependency versions (notably Astro v6). |
| docs/ja/reference/player/video/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/tween/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/text-field/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/sprite/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/sound/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/shape/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/movie-clip/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/filters/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/events/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/player/display-object/index.html | Regenerated static docs output (Player reference page). |
| docs/ja/reference/framework/view/index.html | Regenerated static docs output (Framework reference page). |
| docs/ja/reference/framework/routing/index.html | Regenerated static docs output (Framework reference page). |
| docs/ja/reference/framework/config/index.html | Regenerated static docs output (Framework reference page). |
| docs/ja/reference/framework/animation-tool/index.html | Regenerated static docs output (Framework reference page). |
| docs/en/reference/player/video/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/tween/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/text-field/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/sprite/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/sound/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/shape/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/movie-clip/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/index.html | Regenerated static docs output (Player overview page). |
| docs/en/reference/player/filters/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/events/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/player/display-object/index.html | Regenerated static docs output (Player reference page). |
| docs/en/reference/framework/view/index.html | Regenerated static docs output (Framework reference page). |
| docs/en/reference/framework/routing/index.html | Regenerated static docs output (Framework reference page). |
| docs/en/reference/framework/index.html | Regenerated static docs output (Framework overview page). |
| docs/en/reference/framework/config/index.html | Regenerated static docs output (Framework reference page). |
| docs/en/reference/framework/animation-tool/index.html | Regenerated static docs output (Framework reference page). |
| docs/cn/reference/player/video/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/tween/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/text-field/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/sprite/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/sound/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/shape/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/movie-clip/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/index.html | Regenerated static docs output (Player overview page). |
| docs/cn/reference/player/filters/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/events/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/player/display-object/index.html | Regenerated static docs output (Player reference page). |
| docs/cn/reference/framework/view/index.html | Regenerated static docs output (Framework reference page). |
| docs/cn/reference/framework/routing/index.html | Regenerated static docs output (Framework reference page). |
| docs/cn/reference/framework/index.html | Regenerated static docs output (Framework overview page). |
| docs/cn/reference/framework/config/index.html | Regenerated static docs output (Framework reference page). |
| docs/cn/reference/framework/animation-tool/index.html | Regenerated static docs output (Framework reference page). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export async function getStaticPaths() { | ||
| const paths: any[] = []; | ||
|
|
||
| for (const lang of supportedLanguages) { | ||
| paths.push({ | ||
| params: { lang } | ||
| }); | ||
| } | ||
|
|
||
| return paths; |
There was a problem hiding this comment.
getStaticPaths() builds paths as any[], which removes type-safety for route params and makes it easier to accidentally return an invalid shape. Prefer typing the array (or using supportedLanguages.map(...)) so params.lang stays strongly typed and future changes are caught by TypeScript.
| export async function getStaticPaths() { | ||
| const paths: any[] = []; | ||
|
|
||
| for (const lang of supportedLanguages) { | ||
| paths.push({ | ||
| params: { lang } | ||
| }); | ||
| } | ||
|
|
||
| return paths; |
There was a problem hiding this comment.
getStaticPaths() uses paths: any[], which bypasses type-checking for the returned route objects. Consider typing this to the expected { params: { lang: SupportedLanguage } }[] (or use supportedLanguages.map(...)) to keep params.lang type-safe.
| const playerSpecsCollection = defineCollection({ | ||
| loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/player-specs' }), | ||
| schema: z.object({ | ||
| title: z.string().optional(), | ||
| description: z.string().optional(), | ||
| order: z.number().optional() | ||
| }).optional() | ||
| }); | ||
|
|
||
| const frameworkSpecsCollection = defineCollection({ | ||
| loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/framework-specs' }), | ||
| schema: z.object({ | ||
| title: z.string().optional(), | ||
| description: z.string().optional(), | ||
| order: z.number().optional() | ||
| }).optional() | ||
| }); |
There was a problem hiding this comment.
The collection definitions duplicate the exact same Zod schema for player/framework. Consider extracting a shared schema constant (or helper) to avoid schema drift when a field is added/changed in the future.
No description provided.