manifest.json
Source URL: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/manifest
manifest.json
Section titled “manifest.json”Add or generate a manifest.(json|webmanifest) file that matches the Web Manifest Specification in the root of app directory to provide information about your web application for the browser.
Static Manifest file
Section titled “Static Manifest file”{ "name": "My Next.js Application", "short_name": "Next.js App", "description": "An application built with Next.js", "start_url": "/" // ...}Generate a Manifest file
Section titled “Generate a Manifest file”Add a manifest.js or manifest.ts file that returns a Manifest object.
Good to know:
manifest.jsis special Route Handlers that is cached by default unless it uses a Dynamic API or dynamic config option.
import type { MetadataRoute } from 'next'
export default function manifest(): MetadataRoute.Manifest { return { name: 'Next.js App', short_name: 'Next.js App', description: 'Next.js App', start_url: '/', display: 'standalone', background_color: '#fff', theme_color: '#fff', icons: [ { src: '/favicon.ico', sizes: 'any', type: 'image/x-icon', }, ], }}export default function manifest() { return { name: 'Next.js App', short_name: 'Next.js App', description: 'Next.js App', start_url: '/', display: 'standalone', background_color: '#fff', theme_color: '#fff', icons: [ { src: '/favicon.ico', sizes: 'any', type: 'image/x-icon', }, ], }}