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

docs: fix config types (images, i18n) #13374

Merged
merged 6 commits into from
Mar 11, 2025

Conversation

ArmandPhilippot
Copy link
Member

Changes

  • Fixes image.domains and image.remotePatterns default values (these options expect an array, not an object).

  • De-duplicates the type for i18n (the JSDoc @type tag was set twice)

  • Merge i18n.routing.manual description into i18n.routing and updates the example.

manual is not a key of i18n.routing but an available value. So it currently seems odd that this is listed with the available keys in the docs. And the example is not helpful, this is the one used for prefixDefaultLocale.

  • Fixes the type of i18n.routing

Unless I'm mistaken, the Routing type doesn't exist so maybe it's better to use object? And, the value can also be "manual".

  • Adds missing @docs tag to i18n.domains

The i18n.domains configuration is currently missing. I believe it's because the @docs tag was missing and I don't see any reason why it shouldn't appear in the docs since it is documented in the guides.

  • Removes i18n.routing.strategy

If I'm not mistaken, this is a leftover from #10193 where i18n.routing.strategy: "pathname" became i18n.routing: "manual". The strategy key does not exist in the schema and doesn't seem to be used anywhere.
This key doesn't appear in the docs, so it's not a big deal, but Intellisense suggests it as an available option:

i18n.routing.strategy suggested by VS Code Intellisense

Testing

Existing tests should still pass, unless I'm wrong for i18n.routing.strategy.

Docs

This is docs so,
/cc @withastro/maintainers-docs for feedback
(mainly for the new description of i18n.routing)

I added a changeset just for merging the description of i18n.routing and i18n.routing.strategy as I think this is the "biggest" change. Should I include the other changes in this changeset/add more changesets?

Copy link

changeset-bot bot commented Mar 6, 2025

🦋 Changeset detected

Latest commit: 9eebe4f

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

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) docs pr labels Mar 6, 2025
Copy link

codspeed-hq bot commented Mar 6, 2025

CodSpeed Performance Report

Merging #13374 will not alter performance

Comparing ArmandPhilippot:fix/configuration-reference (9eebe4f) with main (d83f92a)

Summary

✅ 6 untouched benchmarks

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

This looks great! Thank you for cleaning this up! Approving for docs!

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this, it looks good to me

@ematipico ematipico merged commit 7b75bc5 into withastro:main Mar 11, 2025
17 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Mar 11, 2025
@ArmandPhilippot ArmandPhilippot deleted the fix/configuration-reference branch March 11, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants