docs icon indicating copy to clipboard operation
docs copied to clipboard

fix(astro:assets): add docs for missing imports and types

Open ArmandPhilippot opened this issue 1 week ago • 3 comments

Description (required)

  • Moves astro/assets/utils from the Image Service API to astro:assets module 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:
  • Adds astro:assets types
  • Adds astro/assets imports:
  • Adds astro/assets types (same as astro:assets)
  • Adds astro types related to assets (instead of listing them alphabetically, I tried to group them by usage)
  • Updates some existing types to flatten the type when it depends on non-exported types.
  • Removes the GetImageResult code snippet in getImage()
  • 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:assets from the Image Service API

Related issues & labels (optional)

  • Suggested label: add new content, improve or update documentation

ArmandPhilippot avatar Dec 10 '25 18:12 ArmandPhilippot

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 10 '25 18:12 netlify[bot]

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.

astrobot-houston avatar Dec 10 '25 18:12 astrobot-houston

This should be ready to review now!

  • the TOC is a bit heavy now, but if we hide the h4 this would hide the <Image /> properties...
  • getImage() from astro/assets is internal code. I don't know if this is expected or if this should be the astro:assets version instead.

ArmandPhilippot avatar Dec 13 '25 18:12 ArmandPhilippot

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

ArmandPhilippot avatar Dec 16 '25 17:12 ArmandPhilippot