Skip to content

Commit

Permalink
use route
Browse files Browse the repository at this point in the history
  • Loading branch information
torn4dom4n committed May 3, 2024
1 parent 4a10acc commit f7de53d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/og/[...slug].ts → src/pages/og/[...route].ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const pages = Object.fromEntries(entries.map(({ data, id }) => [id, { data }]))
export const { getStaticPaths, GET } = OGImageRoute({
// Pass down the documentation pages.
pages,
// Define the name of the parameter used in the endpoint path, here `slug`
// as the file is named `[...slug].ts`.
param: 'slug',
// Define the name of the parameter used in the endpoint path, here `route`
// as the file is named `[...route].ts`.
param: 'route',
// Define a function called for each page to customize the generated image.
getImageOptions: (_path, page: (typeof pages)[number]) => {
return {
Expand Down

0 comments on commit f7de53d

Please sign in to comment.