Getting Started
Learn how to get started with seo-in-nextjs.
Prerequisites
Section titled “Prerequisites”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
Installation
Section titled “Installation”-
Download the library
.tgzfile from Patreon if you purchased SEO in Next.js, or from this link if you purchased SEO Bundle. -
Place the
.tgzfile in the root of your project and add it to yourpackage.json:package.json {"dependencies": {"@dlcastillop/seo-in-nextjs": "file:./seo-in-nextjs-1.0.0.tgz"}}Then install the dependencies:
Terminal window npm installTerminal window yarnTerminal window pnpm install -
Create a
seo.config.ts(orseo.config.jsif 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: [],}); -
You’re all set! Start using the library in your Next.js project.
Related
Section titled “Related”View related API references.