Skip to content

Getting Started

Learn how to get started with seo-in-nextjs.

You will need to have a Next.js website set up. If you don’t have one yet, you can follow the “Installation” guide in the Next.js docs to create one.

Additionally, your Next.js website must meet the following requirements:

  • App Router
  • Next.js 13.3.0 or higher
  • React 18.2.0 or higher
  1. Download the library .tgz file from Patreon if you purchased SEO in Next.js, or from this link if you purchased SEO Bundle.

  2. Place the .tgz file in the root of your project and add it to your package.json:

    package.json
    {
    "dependencies": {
    "@dlcastillop/seo-in-nextjs": "file:./seo-in-nextjs-1.0.0.tgz"
    }
    }

    Then install the dependencies:

    Terminal window
    npm install
  3. Create a seo.config.ts (or seo.config.js if not using TypeScript) file in the root of your project with the following content and replace it with your corresponding data:

    import { defineSeoConfig } from "@dlcastillop/seo-in-nextjs";
    export default defineSeoConfig({
    baseUrl: "https://example.com",
    siteName: "Example",
    defaultOgImg: "/default-og.png",
    manualRoutes: [],
    });
  4. You’re all set! Start using the library in your Next.js project.

View related API references.