fix(docs): add content config and upgrade Starlight to 0.37#1051
fix(docs): add content config and upgrade Starlight to 0.37#1051albertocavalcante wants to merge 1 commit intomainfrom
Conversation
- Add src/content.config.ts with Starlight docsLoader and docsSchema (required for Astro 5 Content Layer API) - Upgrade @astrojs/starlight from 0.34 to 0.37 to fix page generation The combination of Astro 5 and Starlight 0.34 was only generating 404.html. Starlight 0.37 properly builds all 7 content pages.
Summary of ChangesHello @albertocavalcante, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on updating the documentation website's core framework by upgrading Starlight to its latest stable version. This upgrade necessitates the addition of a new content configuration file to align with Starlight's updated requirements, ensuring the documentation system remains functional and benefits from the latest improvements. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughUpdates the Astro Starlight documentation site configuration by bumping the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request correctly upgrades @astrojs/starlight to 0.37.x. The changes include updating the dependency versions in package.json and bun.lock, and adding the required src/content/config.ts file for Starlight v0.35+. The new configuration file correctly uses docsLoader and docsSchema as recommended. The changes are well-contained and align with the library's upgrade guide. I see no issues with this update.
There was a problem hiding this comment.
Pull request overview
Upgrades the docs site’s Starlight integration to 0.37.x and adds the Astro Content Collections configuration required by Starlight 0.35+, keeping the docs build compatible with newer Starlight releases.
Changes:
- Add
src/content.config.tsdefining thedocscollection using Starlight’s loader and schema. - Bump
@astrojs/starlightdependency from^0.34.0to^0.37.0. - Update
bun.lockto reflect the resolved dependency graph for the upgrade.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/website/src/content.config.ts | Introduces the required content collections configuration for Starlight docs. |
| docs/website/package.json | Upgrades Starlight version range for the docs site. |
| docs/website/bun.lock | Updates lockfile to the new resolved versions after upgrading Starlight. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "dependencies": { | ||
| "@astrojs/starlight": "^0.34.0", | ||
| "@astrojs/starlight": "^0.37.0", | ||
| "astro": "^5.1.8", |
There was a problem hiding this comment.
@astrojs/starlight@0.37.x declares a peer dependency on astro ^5.5.0 (see bun.lock). package.json currently allows installing astro@5.1.x via the ^5.1.8 range, which could produce peer warnings or a broken install if the lockfile is regenerated differently. Consider bumping the astro dependency range to at least ^5.5.0 (or matching the version you intend to support) to encode the minimum required Astro version for this Starlight release.
| "astro": "^5.1.8", | |
| "astro": "^5.5.0", |
Summary
@astrojs/starlightfrom0.34.xto0.37.xcontent.config.tswith docs collection loader/schema (required by Starlight 0.35+)bun.lockwith resolved dependency versionsContext
Starlight 0.35+ changed the social config from object to array format and requires an explicit content config file. The social config array migration was already merged separately; this PR covers the remaining upgrade work (content config + version bump to 0.37).
Test plan
bun installresolves cleanly indocs/websitebun run buildsucceedsSummary by CodeRabbit