Skip to content

defineSeoConfig Reference

seo-in-nextjs must be configured through a seo.config.ts (or seo.config.js if not using TypeScript) file in the root of your project using the defineSeoConfig function with a default export.

import { defineSeoConfig } from "seo-in-nextjs";
export default defineSeoConfig({
baseUrl: "https://example.com",
siteName: "Example",
});

The defineSeoConfig function accepts one parameter, an object containing the following properties:

type: string

Added in: seo-in-nextjs@1.0.0

The base URL of the project.

type: string

Added in: seo-in-nextjs@1.0.0

The name of the site.

type: string

Added in: seo-in-nextjs@1.0.0

The URL of the default Open Graph image.

type: string[]

Added in: seo-in-nextjs@1.0.0

Manually specified routes that cannot be detected through automatic project exploration. Includes dynamic routes, and other routes not directly represented in the file system.

type: string[]

Added in: seo-in-nextjs@1.1.0

Manually specified routes to ignore on sitemap.xml and llms.txt generation.