Skip to content

Commit

Permalink
Fix code example in package readme (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
  • Loading branch information
jasikpark and delucis authored Jan 6, 2025
1 parent 7e22a26 commit bb13312
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-timers-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-og-canvas": patch
---

Fixes a README code example
4 changes: 4 additions & 0 deletions packages/astro-og-canvas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const collectionEntries = await getCollection('my-collection');
const pages = Object.fromEntries(collectionEntries.map(({ slug, data }) => [slug, data]));

export const { getStaticPaths, GET } = OGImageRoute({
// Tell us the name of your dynamic route segment.
// In this case it’s `route`, because the file is named `[...route].ts`.
param: 'route',

pages: pages,

getImageOptions: (path, page) => ({
Expand Down

0 comments on commit bb13312

Please sign in to comment.