本页还没有译文
本页 5 段还没译成한국어,下面显示的是英文原文。Metadata Files API Reference
还没翻译译自英文(nextjs.org)本页 5 段都还没译
This section of the docs covers Metadata file conventions. File-based metadata can be defined by adding special metadata files to route segments.
Each file convention can be defined using a static file (e.g. opengraph-image.jpg), or a dynamic variant that uses code to generate the file (e.g. opengraph-image.js).
Once a file is defined, Next.js will automatically serve the file (with hashes in production for caching) and update the relevant head elements with the correct metadata, such as the asset's URL, file type, and image size.
Good to know
- Special Route Handlers like
sitemap.ts,opengraph-image.tsx, andicon.tsx, and other metadata files are cached by default. - If using along with
proxy.ts, configure the matcher to exclude the metadata files.
AI 翻译查看英文原文