Export static metadata for fixed page values or `generateMetadata` when metadata depends on route/data: ```ts export const metadata = { title: 'Products', description: 'Browse our products', openGraph: { title: 'Products', images: ['/og/products.png'] }, } ``` Keep metadata in `layout.tsx`/`page.tsx` or `generateMetadata`, not `_document.tsx`. Add canonical and locale metadata where applicable, and ensure each page has a meaningful title, description, and Open Graph image.
Installs into .claude/skills of the current project.
Are you the author of Nextjs Optimization?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nextjs-optimization-1e386048)
Export static metadata for fixed page values or `generateMetadata` when metadata depends on route/data:
```ts
export const metadata = {
title: 'Products',
description: 'Browse our products',
openGraph: { title: 'Products', images: ['/og/products.png'] },
}
```
Keep metadata in `layout.tsx`/`page.tsx` or `generateMetadata`, not `_document.tsx`. Add canonical and locale metadata where applicable, and ensure each page has a meaningful title, description, and Open Graph image.