fix(astro:assets): add docs for missing imports and types
Description (required)
- Moves
astro/assets/utilsfrom the Image Service API toastro:assetsmodule because we're now documenting the slash versions alongside the virtual modules. No content has changed except the following:- Updates the line breaks/indentation while moving the existing content.
- Simplifies the code snippets
- Updates
matchProtocol()description (default value) - Adds default for
matchPort()
- Formats headings for consistent use of inline code
- Adds new imports for
astro:assets:getConfiguredImageService(): added in https://github.com/withastro/astro/pull/6530imageConfig: added in https://github.com/withastro/astro/pull/8414
- Adds
astro:assetstypes - Adds
astro/assetsimports:baseServicegetConfiguredImageService(): same asastro:assetsgetImage(): because this is internal code we probably don't want to expose it? Maybe this should be theastro:assetsversion instead.isLocalService()
- Adds
astro/assetstypes (same asastro:assets) - Adds
astrotypes related to assets (instead of listing them alphabetically, I tried to group them by usage)ImageInputFormatImageMetadata: added in https://github.com/withastro/astro/pull/6530orientation: added in https://github.com/withastro/astro/pull/7637
ImageOutputFormatImageQualityImageQualityPresetImageTransformdensitiesandwidths: added in https://github.com/withastro/astro/pull/8620fitandposition: added in https://github.com/withastro/astro/pull/12377 Note that responsive images have been stabilized in https://github.com/withastro/astro/pull/13917 but this doesn't updateImageTransform, so saying "since v5" is probably fine?
UnresolvedImageTransformGetImageResultsrcSet: added in https://github.com/withastro/astro/pull/8620
RemotePattern: exported in https://github.com/withastro/astro/commit/6ee63bfac4856f21b4d4633021b3d2ee059e553f / https://github.com/withastro/astro/pull/14466ImageServiceConfig: added in https://github.com/withastro/astro/pull/6848ImageServiceExternalImageServiceLocalImageService
- Updates some existing types to flatten the type when it depends on non-exported types.
- Removes the
GetImageResultcode snippet ingetImage() - Reword a section in Image Service API and in the Images guide to replace a type displayed as a code snippet with a link
- Adds more link to
astro:assetsfrom the Image Service API
Related issues & labels (optional)
- Suggested label:
add new content,improve or update documentation
Deploy Preview for astro-docs-2 ready!
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 333cabf35302b90fea7a5d4234e909207b8d95e8 |
| Latest deploy log | https://app.netlify.com/projects/astro-docs-2/deploys/69419be4e199dd000931ea6e |
| Deploy Preview | https://deploy-preview-12867--astro-docs-2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Lunaria Status Overview
🌕 This pull request will trigger status changes.
Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.
Tracked Files
| File | Note |
|---|---|
| en/guides/images.mdx | Source changed, localizations will be marked as outdated. |
| en/guides/migrate-to-astro/from-gatsby.mdx | Source changed, localizations will be marked as outdated. |
| en/guides/migrate-to-astro/from-nextjs.mdx | Source changed, localizations will be marked as outdated. |
| en/guides/migrate-to-astro/from-nuxtjs.mdx | Source changed, localizations will be marked as outdated. |
| en/guides/upgrade-to/v3.mdx | Source changed, localizations will be marked as outdated. |
| en/reference/image-service-reference.mdx | Source changed, localizations will be marked as outdated. |
| en/reference/modules/astro-assets.mdx | Source changed, localizations will be marked as outdated. |
| ru/guides/upgrade-to/v3.mdx | Localization changed, will be marked as complete. |
Warnings reference
| Icon | Description |
|---|---|
| 🔄️ | The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied. |
This should be ready to review now!
- the TOC is a bit heavy now, but if we hide the
h4this would hide the<Image />properties... getImage()fromastro/assetsis internal code. I don't know if this is expected or if this should be theastro:assetsversion instead.
I believe we would need this because of the ru file:
@lunaria-track:src/content/docs/en/**.mdx
https://lunaria.dev/guides/tracking/#lunaria-track