Skip to content
This repository was archived by the owner on Oct 7, 2023. It is now read-only.
/ next-seo Public archive

Simple SEO management to Next.js v13+

Notifications You must be signed in to change notification settings

meluiz/next-seo

Repository files navigation

Next SEO

Simple SEO managment that makes managing SEO easier in NextJS v13+ projects.

This project was based to garmeeh/next-seo.

Install

With npm

npm install --save @meluiz/next-seo

Or yarn

yarn add --save @meluiz/next-seo

Usage

// app/head.jsx

import React from "react";
import { seo } from "@meluiz/next-seo";

export default function Head() {
  return <React.Fragment>{seo.render()}</React.Fragment>;
}

Default SEO

// app/head.jsx

import React from "react";
import { seo } from "@meluiz/next-seo";

export default function Head() {
  seo.default({ ...SEOProps });

  return <React.Fragment>{seo.render()}</React.Fragment>;
}

Make SEO

// app/page.jsx

import React from "react";
import { seo } from "@meluiz/next-seo";

export default function Page({ children }) {
  seo.make({ ...SEOProps });

  return <div>{children}</div>;
}

SEO Props

The default and make method work with this bollow props:

Global

Property Type
title string
titleTemplate string
noindex boolean
nofollow boolean
robots Robots
description string
cononical string
themeColor string
metatag Array<Metatag>
linktag Array<Linktag>
twitter Twitter
opengraph Opengraph

Robots

Property Type
nosnippet boolean
maxSnippet number
maxImagePreview "none", "standard" or "large"
maxVideoPreview number
noarchive boolean
unavailableAfter string
noimageindex boolean
notranslate boolean

Book

Property Type
authors Array<string>
isbn string
releaseDate string
tags Array<string>

Video Actor

Property Type
role string
profile string

Video

Property Type
actors Array<VideoActor>
directors Array<string>
writers Array<string>
duration number
releaseDate string
tags Array<string>
series string

Article

Property Type
publishedTime string
modifiedTime string
expirationTime string
authors Array<string>
section string
tags Array<string>

Profile

Property Type
firstName string
lastName string
username string
gender string

Media

Property Type
url string
type string
title string
description string
siteName string
locale string
book Book
video Video
article Article
profile Profile
images Media[]
videos Media[]
audio Media[]
defaultImageHeight number
defaultImageWidth number
defaultOpenGraphVideoWidth number
defaultOpenGraphVideoHeight number

Metatag

Property Type
name string
property string
httpEquiv "content-security-policy", "content-type", default-style", "x-ua-compatible" or "refresh"
content string
keyOverride string

Linktag

Property Type
rel string
href string
sizes string
media string
type string
color string
keyOverride string
as string
crossOrigin string

Twitter

Property Type
site string
handle string
cardType "summary", "summary_large_image", "app" or "player"

Opengraph

Property Type
url string
type string
title string
description string
siteName string
locale string
book Book
video Video
article Article
profile Profile
images Array<Media>
videos Array<Media>
audio Array<Media>
defaultImageHeight number
defaultImageWidth number
defaultOpenGraphVideoWidth number
defaultOpenGraphVideoHeight number

About

Simple SEO management to Next.js v13+

Resources

Stars

Watchers

Forks

Packages

No packages published