markteekman / accessible-astro-starter

An Accessible Starter Theme for Astro 4.0 including accessibility features such as landmarks, better focus-outline and skip-links navigation. Ships with Tailwind, Prettier and ESLint support.
https://accessible-astro.netlify.app/
MIT License
758 stars 139 forks source link

Feature: Update `astro-icon` to v1 and svgo #89

Closed Ticolyle closed 9 months ago

Ticolyle commented 10 months ago

Hello! My compliments to an excellent astro starter repo with great baseline accessibility.

When I first tried out this repo I ran into issues with svgo and it's dependency sharp.

While troubleshooting the build, I found that astro-icon had been updated to v1 with some breaking changes. After updating in my personal project I found the changes to be fairly straightforward and thought to replicate for you on the main repo.

Most of the changes needed are documented in the astro-icon upgrade docs: https://www.astroicon.dev/guides/upgrade/v1/

I also needed to make some minor changes to the css styles to match the current site design. These changes are needed as the astro-icon now delivers icons with the width and height props, not previously present on the svg elements.

package.json changes:

- upgrade astro-icon 0.7.3 => 1.0.2
- upgrade svgo 2.8.0 => 3.2.0
- add @iconify-json/ion
- add @iconify-json/mdi

Cheers, and let me know if you have any questions.

netlify[bot] commented 10 months ago

Deploy Preview for accessible-astro ready!

Name Link
Latest commit dec9ca626dc7ffff2376c8e4130c0215c57dee9f
Latest deploy log https://app.netlify.com/sites/accessible-astro/deploys/659df65b11bcff00087806c7
Deploy Preview https://deploy-preview-89--accessible-astro.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 site configuration.

markteekman commented 9 months ago

Hey @Ticolyle! Thanks for taking the time to upgrade Astro Icon on this repository, I always appreciate the help 😊 Your explanation is clear and the changes you've made look solid! Theres only one small issue, the Accessible Astro Components package still references to [astro-icon]. I'll fix that first and then merge your PR 😄 Thanks again!