Skip to content

Conversation

@azat-io
Copy link
Contributor

@azat-io azat-io commented Oct 28, 2025

Description (required)

Adds documentation for the new experimental SVG optimization feature.

Related to: withastro/astro#13880

  • Added new page at /reference/experimental-flags/svg/
  • Includes configuration examples and common use cases
  • Documents SVGO integration and error handling

Related issues & labels (optional)

N/A.

@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 553426a
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/690ce08fcb7b91000835ced1
😎 Deploy Preview https://deploy-preview-12637--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.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented Oct 28, 2025

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/reference/experimental-flags/svg-optimization.mdx Localization added, 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.

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.

Thanks for this docs PR @azat-io ! It's wonderfully well-written and a pleasure to read!

I made some initial comments/thoughts here, because I still want some questions answered in the other PR first before we look at this one too closely. Just want to make sure we're clear on the feature before we hit the docs too hard, but it's now a work in progress! 🙌

@sarah11918 sarah11918 added add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah! and removed minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah! labels Oct 29, 2025
@sarah11918 sarah11918 added this to the v6.0.0 docs milestone Oct 29, 2025
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.

Thanks for the further clarifications and updates!

I've left already a handful of comments below for some reworking of the page here for your consideration.

Also, given that this works only for SVG components, in general, let's use the term "SVG component imports" instead of "SVG imports." This avoids the question of whether this does anything for SVG's not used specifically as components. (For example, people might wonder about using this with UI framework components, but the SVG component pattern is only for Astro components.)

I know below is a lot, so I'm going to stop now and let you look over it all! 😄

@azat-io
Copy link
Contributor Author

azat-io commented Oct 30, 2025

  1. Restructured document: moved Usage before Configuration
  2. Updated terminology: "SVG assets" → "SVG components" with link to guide
  3. Enhanced Usage section: added error handling info, noted no per-component opt-out
  4. Added svgoConfig documentation: plugins subsection and other options subsection
  5. Updated SVGO link: from preset-default to general plugins page
  6. Enhanced "Common use cases": added intro paragraph, replaced removeHiddenElems with removeMetadata
  7. Simplified "Further reading": removed redundant links

@sarah11918
Copy link
Member

This looks fantastic @azat-io , thank you! Just one broken link here, as mentioned, but then I think this is great!

@sarah11918 sarah11918 added the minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah! label Nov 4, 2025
@sarah11918 sarah11918 modified the milestones: v6.0.0 docs, 5.16.0 Nov 4, 2025
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.

LGTM! Thank you for all your work and responsiveness getting these docs done, @azat-io ! Assuming nothing about this feature changes, these docs will be ready to merge when 5.16.0 is released! 🥳

@sarah11918
Copy link
Member

@yanthomasdev - feel free to review at any time!

@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Nov 6, 2025
Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Thanks, that looks useful! LGTM, I only left two nits (wrong highlighted line and a link that seems a bit odd to me).

Co-authored-by: Armand Philippot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants