Skip to content

Commit

Permalink
Fix Astro SVG sprite sheet typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelazaroff committed Jan 6, 2024
1 parent 8fe4158 commit fd975c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion astro/generate-a-static-svg-sprite-sheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Generally, my process looks something like this:

I usually run it out of band, immediately before actually building the website. My build command ends up looking something like `pnpm svg && pnpm build` (where those are both `package.json` scripts that build the sprite sheet and the rest of the site).

No longer! At least for Astro sites. Arne Bahlo has a great tutorial on [statically generating open graph images using Astro API routes](https://arne.me/articles/static-og-images-in-astro), and I realized that I use do the same technique to generate SVG sprite sheets.
No longer! At least for Astro sites. Arne Bahlo has a great tutorial on [statically generating open graph images using Astro API routes](https://arne.me/articles/static-og-images-in-astro), and I realized that the same technique will work to generate SVG sprite sheets.

The key insight is that in static mode, [API routes](https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes) get rendered to static files. So this roughly the same workflow, except `svg-sprite` gets called programmatically instead of on the command line.

Expand Down

0 comments on commit fd975c5

Please sign in to comment.