feat(v6): add docs for astro/config module#13222
Open
ArmandPhilippot wants to merge 4 commits intov6from
Open
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description (required)
Adds docs for
astro/configexports in ourastro:configmodule reference:defineConfig(): Not the easiest to describe... I was tempted by "Defines the configuration for" 😄envField, I see two options (I chose the first one):envFieldmethods.fontProviders: pretty minimal because we already have a reference for all the providersgetViteConfig(): Added in AddgetViteConfighelper astro#4154 (v1, so no Since). I don't know if there are other use cases than Vitest, linking to the Testing guide is probably enough.mergeConfig(): moved from Programmatic Astro API with some rewordingpassthroughImageService(): I reused the wording we had in the Images guide.sessionDrivers: the object is pretty big, so I think it's fine to keep it minimal and use links, as withfontProviders.sharpImageService(): not really added, but this is available from this module since fix: move service functions from astro/assets to astro/config so it can be imported astro#6995 and I'm not really quite sure about any use cases since Sharp is now the default image service.validateConfig(): moved from Programmatic Astro API with some rewordingUpdates the
env.schemaconfiguration reference as a preview of what it might look like if we update the JSDoc (seeenvField). If we're happy with that, we'll need to make a PR in the core repo!Things to consider:
mergeConfig()andvalidateConfig()from the Programmatic Astro API page? I don't see any obvious place because the current content is focused on CLI commands executed programmatically. We might need to reword a bit the introduction if we want to add links.envField.Related issues & labels (optional)