docs: fix config types (images, i18n) #13374
Merged
+38
−41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Fixes
image.domains
andimage.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 intoi18n.routing
and updates the example.manual
is not a key ofi18n.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 forprefixDefaultLocale
.i18n.routing
Unless I'm mistaken, the
Routing
type doesn't exist so maybe it's better to useobject
? And, the value can also be"manual"
.@docs
tag toi18n.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.i18n.routing.strategy
If I'm not mistaken, this is a leftover from #10193 where
i18n.routing.strategy: "pathname"
becamei18n.routing: "manual"
. Thestrategy
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:
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
andi18n.routing.strategy
as I think this is the "biggest" change. Should I include the other changes in this changeset/add more changesets?