Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extend options to docs and i18n schemas #1162

Merged
merged 8 commits into from
Nov 29, 2023
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Nov 28, 2023

Description

Copy link

changeset-bot bot commented Nov 28, 2023

🦋 Changeset detected

Latest commit: 79400ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Nov 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Nov 29, 2023 7:35pm

@github-actions github-actions bot added 📚 docs Documentation website changes 🌟 core Changes to Starlight’s main package labels Nov 28, 2023
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Nov 28, 2023

size-limit report 📦

Path Size
/index.html 5.12 KB (0%)
/_astro/*.js 20.11 KB (0%)
/_astro/*.css 13 KB (0%)

Copy link

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We schemust merge this right away!

@delucis delucis added the 🌟 minor Change that triggers a minor release label Nov 28, 2023
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it with my blog integration which ships a custom schema, works as I expected.

Will happily make the following changes to my docs ^^

  import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'
  import { defineCollection } from 'astro:content'
- import { docsAndBlogSchema } from 'starlight-blog/schema'
+ import { blogSchema } from 'starlight-blog/schema'

  export const collections = {
-   docs: defineCollection({ schema: docsAndBlogSchema }),
+   docs: defineCollection({ schema: docsSchema({ extend: blogSchema }) }),
    i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
  }

I would have approved but small question: why are the changes of the i18n guide not visible in the preview? I see the changes in the diff but not in the preview. 🤔

Edit: nvm, they display fine locally, I guess it's a preview issue, weird

@delucis
Copy link
Member Author

delucis commented Nov 28, 2023

why are the changes of the i18n guide not visible in the preview?

Yes, noted this in the PR comment — for some reason Vercel didn’t pick newer commits so the preview is out of date. Don’t really know why!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 📚 docs Documentation website changes 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants