Yesterday I added opengraph images to my site using Vercel's @vercel/og package. I wanted to create an OG image for all blog posts as well as all other pages. The blog posts are all in a content collection but the other pages are a mix of .astro and .md pages.
It was trivial to get all info about the blog posts by using Astro's getCollection() function but I couldn't find a way to automatically get the other pages. Is there a way to do that?
I solved the issue by creating a dictionary for all the other pages and merging that with the data from getCollection() but I was hoping for a better way...
FYI you can see my code here: https://github.com/mrmartineau/zander.wtf/blob/main/src/pages/opengraph/[slug]/og.png.ts#L179-L191