Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the benefit of using this one vs the other native to Astro? #7

Open
adriangalilea opened this issue Mar 8, 2024 · 3 comments

Comments

@adriangalilea
Copy link

I've seen a few OG image generators, is there any reason why you pref satori over those?

Just curious before I implement any, thank you.

@florian-lefebvre
Copy link
Owner

I think there are 2 cases really:

  1. You don't need much customization, go for https://github.com/delucis/astro-og-canvas/tree/latest/packages/astro-og-canvas
  2. You need a fully custom OG image, use this integration

@adriangalilea
Copy link
Author

How well would this play with Astro content collections?

@florian-lefebvre
Copy link
Owner

It works well! After all, you can have such a setup:

  • an endpoint for the og image
  • getStaticPaths based on a collection that returns some props
  • use that props in the endpoint to pass those to your satori template (for example as a component prop)

This package's API is pretty flexible but it has nothing built-in for content collections. It can be done easily with some basic Astro knowledge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants