Unverified Commit 5747afd2 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

docs: remove invalid og image cases (#66355)

### What

Removing the `/[...catchall]/<metadata image convention>.js` case from
docs

### Why

Since og image and icon routes are using catch-all routes to handle the
both single or multiple routes. For instance:

`app/opengraph-image.js` can possibly generate two cases: 

- single route: `/opengraph-image`
- multi routes with `generateImageMetadata()`:  `/opengraph-image/[id]`

We're not able to detect if there's `generateImageMetadata` defined in
the file before mapping the routes, and decided to create the different
routes to either `/opengraph-image` or `/opengraph-image/[id]`. That's
why we're using a catch-all routes to handle them rn.

Related #48106 
Related #57349
parent e2d00827
......@@ -196,7 +196,6 @@ export default function Icon({ params }) {
| `app/shop/icon.js` | `/shop` | `undefined` |
| `app/shop/[slug]/icon.js` | `/shop/1` | `{ slug: '1' }` |
| `app/shop/[tag]/[item]/icon.js` | `/shop/1/2` | `{ tag: '1', item: '2' }` |
| `app/shop/[...slug]/icon.js` | `/shop/1/2` | `{ slug: ['1', '2'] }` |
### Returns
......
......@@ -40,7 +40,6 @@ export function generateImageMetadata({ params }) {
| `app/shop/icon.js` | `/shop` | `undefined` |
| `app/shop/[slug]/icon.js` | `/shop/1` | `{ slug: '1' }` |
| `app/shop/[tag]/[item]/icon.js` | `/shop/1/2` | `{ tag: '1', item: '2' }` |
| `app/shop/[...slug]/icon.js` | `/shop/1/2` | `{ slug: ['1', '2'] }` |
## Returns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment