next-seo

v6.6.0
SEO plugin for Next.js projects
next.js seo react node ssr

Have you seen the new Next.js newsletter?

NextjsWeekly banner

Useful Tools

  • dub recently launched a useful Free UTM builder! You can use it here

Next SEO

npm

Next SEO is a plugin that makes managing your SEO easier in Next.js projects.

Pull requests are very welcome. Also make sure to check out the issues for feature requests if you are looking for inspiration on what to add.

Feel like supporting this free plugin?

It takes a lot of time to maintain an open source project so any small contribution is greatly appreciated.

Coffee fuels coding ☕️

Buy Me A Coffee

next-seo.wallet (ERC20 & SOL)

Note on app directory

This note is only relevant if using the app directory.

For standard meta data (e.g., , ) then it is highly recommended that you use the built-in <code>generateMetaData</code> method. You can check out the docs <a href="https://beta.nextjs.org/docs/guides/seo#usage">here</a></p> <p>For JSON-LD then, the only change needed is to add <code>useAppDir={true}</code> to the JSON-LD component in use. You should add use this component in your <code>page.js</code> and NOT your <code>head.js</code>.</p> <pre><code><ArticleJsonLd useAppDir={true} url="https://example.com/article" title="Article headline" <- required for app directory /> </code></pre><p>If you are using <strong><code>pages</code></strong> directory then <code>NextSeo</code> is <strong>exactly what you need</strong> for your SEO needs!</p> <h3>Table of Contents</h3> <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> <ul> <li><a href="#usage">Usage</a><ul> <li><a href="#setup">Setup</a></li> <li><a href="#add-seo-to-page">Add SEO to Page</a></li> <li><a href="#default-seo-configuration">Default SEO Configuration</a></li> <li><a href="#nextseo-options">NextSeo Options</a><ul> <li><a href="#title-template">Title Template</a></li> <li><a href="#default-title">Default Title</a></li> <li><a href="#no-index">No Index</a></li> <li><a href="#dangerouslysetallpagestonoindex">dangerouslySetAllPagesToNoIndex</a></li> <li><a href="#no-follow">No Follow</a></li> <li><a href="#dangerouslysetallpagestonofollow">dangerouslySetAllPagesToNoFollow</a></li> <li><a href="#robotsprops">robotsProps</a></li> <li><a href="#twitter">Twitter</a></li> <li><a href="#facebook">Facebook</a></li> <li><a href="#canonical-url">Canonical URL</a></li> <li><a href="#alternate">Alternate</a></li> <li><a href="#additional-meta-tags">Additional Meta Tags</a></li> <li><a href="#additional-link-tags">Additional Link Tags</a></li> </ul> </li> </ul> </li> <li><a href="#open-graph">Open Graph</a><ul> <li><a href="#open-graph-examples">Open Graph Examples</a><ul> <li><a href="#basic">Basic</a></li> <li><a href="#video">Video</a></li> <li><a href="#audio">Audio</a></li> <li><a href="#article">Article</a></li> <li><a href="#book">Book</a></li> <li><a href="#profile">Profile</a></li> </ul> </li> </ul> </li> <li><a href="#json-ld">JSON-LD</a><ul> <li><a href="#json-ld-security">JSON-LD Security</a></li> <li><a href="#handling-multiple-instances">Handling multiple instances</a></li> <li><a href="#article-1">Article</a></li> <li><a href="#breadcrumb">Breadcrumb</a></li> <li><a href="#blog">Blog</a></li> <li><a href="#campground">Campground</a></li> <li><a href="#recipe">Recipe</a></li> <li><a href="#sitelinks-search-box">Sitelinks Search Box</a></li> <li><a href="#course">Course</a></li> <li><a href="#dataset">Dataset</a></li> <li><a href="#corporate-contact">Corporate Contact</a></li> <li><a href="#faq-page">FAQ Page</a></li> <li><a href="#how-to">How-to</a></li> <li><a href="#job-posting">Job Posting</a></li> <li><a href="#local-business">Local Business</a></li> <li><a href="#logo">Logo</a></li> <li><a href="#product">Product</a></li> <li><a href="#social-profile">Social Profile</a></li> <li><a href="#news-article">News Article</a></li> <li><a href="#park">Park</a></li> <li><a href="#video-1">Video</a></li> <li><a href="#videogame">VideoGame</a></li> <li><a href="#event">Event</a></li> <li><a href="#qa">Q&A</a></li> <li><a href="#collection-page">Collection Page</a></li> <li><a href="#profile-page">Profile page</a></li> <li><a href="#carousel">Carousel</a><ul> <li><a href="#default-summary-list">Default (Summary List)</a></li> <li><a href="#course-1">Course</a></li> <li><a href="#movie">Movie</a></li> <li><a href="#recipe-1">Recipe</a></li> <li><a href="#custom">Custom</a></li> </ul> </li> <li><a href="#software-app">Software App</a></li> <li><a href="#organization">Organization</a></li> <li><a href="#brand">Brand</a></li> <li><a href="#webpage">WebPage</a></li> <li><a href="#image-metadata">Image Metadata</a></li> </ul> </li> <li><a href="#contributors">Contributors</a></li> </ul> <!-- END doctoc generated TOC please keep comment here to allow auto update --> <h2>Usage</h2> <p><code>NextSeo</code> works by including it on pages where you would like SEO attributes to be added. Once included on the page, you pass it a configuration object with the page's SEO properties. This can be dynamically generated at a page level, or in some cases, your API may return an SEO object.</p> <h3>Setup</h3> <p>First, install it:</p> <pre><code class="hljs language-bash">npm install next-seo </code></pre><p>or</p> <pre><code class="hljs language-bash">yarn add next-seo </code></pre><h3>Add SEO to Page</h3> <hr> <p><strong>Using Next.js app directory introduced in Next.js 13?</strong></p> <p>If you are using the Next.js app directory, then it is highly recommended that you use the built-in <code>generateMetaData</code> method. You can check out the docs <a href="https://beta.nextjs.org/docs/guides/seo#usage">here</a></p> <p>If you are using the <code>pages</code> directory, then <code>NextSeo</code> is exactly what you need for your SEO needs!</p> <hr> <p>Then, you need to import <code>NextSeo</code> and add the desired properties. This will render out the tags in the <code><head></code> for SEO. At a bare minimum, you should add a title and description.</p> <p><strong>Example with just title and description:</strong></p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Simple Usage Example"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"A short description goes here."</span> /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Simple Usage<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p>But <code>NextSeo</code> gives you many more options that you can add. See below for a typical example of a page.</p> <p><strong>Typical page example:</strong></p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Using More of Config"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"This example uses more of the available config options."</span> <span class="hljs-attr">canonical</span>=<span class="hljs-string">"https://www.canonical.ie/"</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.url.ie</span>/<span class="hljs-attr">a</span>', <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Description</span>', <span class="hljs-attr">images:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image-01.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">800</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">600</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Og</span> <span class="hljs-attr">Image</span> <span class="hljs-attr">Alt</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">image</span>/<span class="hljs-attr">jpeg</span>', }, { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image-02.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">900</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">800</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Og</span> <span class="hljs-attr">Image</span> <span class="hljs-attr">Alt</span> <span class="hljs-attr">Second</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">image</span>/<span class="hljs-attr">jpeg</span>', }, { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image-03.jpg</span>' }, { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image-04.jpg</span>' }, ], <span class="hljs-attr">siteName:</span> '<span class="hljs-attr">SiteName</span>', }} <span class="hljs-attr">twitter</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">handle:</span> '@<span class="hljs-attr">handle</span>', <span class="hljs-attr">site:</span> '@<span class="hljs-attr">site</span>', <span class="hljs-attr">cardType:</span> '<span class="hljs-attr">summary_large_image</span>', }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>SEO Added to Page<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>A note on Twitter Tags</strong></p> <p>Props <code>cardType</code>, <code>site</code>, <code>handle</code> are equivalent to <code>twitter:card</code>, <code>twitter:site</code>, <code>twitter:creator</code>. Documentation can be found <a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary">here</a>.</p> <p>Twitter will read the <code>og:title</code>, <code>og:image</code> and <code>og:description</code> tags for their card. <code>next-seo</code> omits <code>twitter:title</code>, <code>twitter:image</code> and <code>twitter:description</code> to avoid duplication.</p> <p>Some tools may report this as an error. See <a href="https://github.com/garmeeh/next-seo/issues/14">Issue #14</a></p> <h3>Default SEO Configuration</h3> <p><code>NextSeo</code> enables you to set some default SEO properties that will appear on all pages without needing to include anything on them. You can also override these on a page-by-page basis if needed.</p> <p>To achieve this, you will need to create a custom <code><App></code>. In your pages directory, create a new file, <code>_app.js</code>. See the Next.js docs <a href="https://nextjs.org/docs/advanced-features/custom-app">here</a> for more info on a custom <code><App></code>.</p> <p>Within this file you will need to import <code>DefaultSeo</code> from <code>next-seo</code> and pass it props.</p> <p>Here is a typical example:</p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> <span class="hljs-title class_">App</span>, { <span class="hljs-title class_">Container</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next/app'</span>; <span class="hljs-keyword">import</span> { <span class="hljs-title class_">DefaultSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-comment">// import your default seo configuration</span> <span class="hljs-keyword">import</span> <span class="hljs-variable constant_">SEO</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'../next-seo.config'</span>; <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">class</span> <span class="hljs-title class_">MyApp</span> <span class="hljs-keyword">extends</span> <span class="hljs-title class_ inherited__">App</span> { <span class="hljs-title function_">render</span>(<span class="hljs-params"></span>) { <span class="hljs-keyword">const</span> { <span class="hljs-title class_">Component</span>, pageProps } = <span class="hljs-variable language_">this</span>.<span class="hljs-property">props</span>; <span class="hljs-keyword">return</span> ( <span class="language-xml"><span class="hljs-tag"><<span class="hljs-name">Container</span>></span> <span class="hljs-tag"><<span class="hljs-name">DefaultSeo</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">type:</span> '<span class="hljs-attr">website</span>', <span class="hljs-attr">locale:</span> '<span class="hljs-attr">en_IE</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.url.ie</span>/', <span class="hljs-attr">siteName:</span> '<span class="hljs-attr">SiteName</span>', }} <span class="hljs-attr">twitter</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">handle:</span> '@<span class="hljs-attr">handle</span>', <span class="hljs-attr">site:</span> '@<span class="hljs-attr">site</span>', <span class="hljs-attr">cardType:</span> '<span class="hljs-attr">summary_large_image</span>', }} /></span> <span class="hljs-tag"><<span class="hljs-name">Component</span> {<span class="hljs-attr">...pageProps</span>} /></span> <span class="hljs-tag"></<span class="hljs-name">Container</span>></span></span> ); } } </code></pre><p>To work properly, <code>DefaultSeo</code> should be placed above (before) <code>Component</code> due to the behavior of Next.js internals.</p> <p>Alternatively, you can also create a config file to store default values such as <code>next-seo.config.js</code></p> <pre><code class="hljs language-js"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> { <span class="hljs-attr">openGraph</span>: { <span class="hljs-attr">type</span>: <span class="hljs-string">'website'</span>, <span class="hljs-attr">locale</span>: <span class="hljs-string">'en_IE'</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.url.ie/'</span>, <span class="hljs-attr">siteName</span>: <span class="hljs-string">'SiteName'</span>, }, <span class="hljs-attr">twitter</span>: { <span class="hljs-attr">handle</span>: <span class="hljs-string">'@handle'</span>, <span class="hljs-attr">site</span>: <span class="hljs-string">'@site'</span>, <span class="hljs-attr">cardType</span>: <span class="hljs-string">'summary_large_image'</span>, }, }; </code></pre><details><summary>or like this, if you are using TypeScript</summary> <p> <pre><code class="hljs language-ts"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">DefaultSeoProps</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-attr">config</span>: <span class="hljs-title class_">DefaultSeoProps</span> = { <span class="hljs-attr">openGraph</span>: { <span class="hljs-attr">type</span>: <span class="hljs-string">'website'</span>, <span class="hljs-attr">locale</span>: <span class="hljs-string">'en_IE'</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.url.ie/'</span>, <span class="hljs-attr">siteName</span>: <span class="hljs-string">'SiteName'</span>, }, <span class="hljs-attr">twitter</span>: { <span class="hljs-attr">handle</span>: <span class="hljs-string">'@handle'</span>, <span class="hljs-attr">site</span>: <span class="hljs-string">'@site'</span>, <span class="hljs-attr">cardType</span>: <span class="hljs-string">'summary_large_image'</span>, }, }; <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> config; </code></pre></p> </details> <p>import at the top of <code>_app.js</code></p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> <span class="hljs-variable constant_">SEO</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'../next-seo.config'</span>; </code></pre><p>and the <code>DefaultSeo</code> component can be used like this instead</p> <pre><code class="hljs language-jsx"><<span class="hljs-title class_">DefaultSeo</span> {...<span class="hljs-variable constant_">SEO</span>} /> </code></pre><p>From now on, all of your pages will have the defaults above applied.</p> <p><strong>Note that <code>Container</code> is deprecated in Next.js v9.0.4 so you should replace that component here with <code>React.Fragment</code> on this version and later - see <a href="https://github.com/zeit/next.js/blob/master/errors/app-container-deprecated.md">here</a></strong></p> <h3>NextSeo Options</h3> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody><tr> <td><code>titleTemplate</code></td> <td>string</td> <td>Allows you to set default title template that will be added to your title <a href="#title-template">More Info</a></td> </tr> <tr> <td><code>title</code></td> <td>string</td> <td>Set the meta title of the page</td> </tr> <tr> <td><code>defaultTitle</code></td> <td>string</td> <td>If no title is set on a page, this string will be used instead of an empty <code>titleTemplate</code> <a href="#default-title">More Info</a></td> </tr> <tr> <td><code>noindex</code></td> <td>boolean (default false)</td> <td>Sets whether page should be indexed or not <a href="#no-index">More Info</a></td> </tr> <tr> <td><code>nofollow</code></td> <td>boolean (default false)</td> <td>Sets whether page should be followed or not <a href="#no-follow">More Info</a></td> </tr> <tr> <td><code>robotsProps</code></td> <td>Object</td> <td>Set the more meta information for the <code>X-Robots-Tag</code> <a href="#robotsprops">More Info</a></td> </tr> <tr> <td><code>description</code></td> <td>string</td> <td>Set the page meta description</td> </tr> <tr> <td><code>canonical</code></td> <td>string</td> <td>Set the page canonical url</td> </tr> <tr> <td><code>mobileAlternate.media</code></td> <td>string</td> <td>Set what screen size the mobile website should be served from</td> </tr> <tr> <td><code>mobileAlternate.href</code></td> <td>string</td> <td>Set the mobile page alternate url</td> </tr> <tr> <td><code>languageAlternates</code></td> <td>array</td> <td>Set the language of the alternate urls. Expects array of objects with the shape: <code>{ hrefLang: string, href: string }</code></td> </tr> <tr> <td><code>themeColor</code></td> <td>string</td> <td>Indicates a suggested color that user agents should use to customize the display of the page or of the surrounding user interface. Must contain a valid CSS color</td> </tr> <tr> <td><code>additionalMetaTags</code></td> <td>array</td> <td>Allows you to add a meta tag that is not documented here. <a href="#additional-meta-tags">More Info</a></td> </tr> <tr> <td><code>additionalLinkTags</code></td> <td>array</td> <td>Allows you to add a link tag that is not documented here. <a href="#additional-link-tags">More Info</a></td> </tr> <tr> <td><code>twitter.cardType</code></td> <td>string</td> <td>The card type, which will be one of <code>summary</code>, <code>summary_large_image</code>, <code>app</code>, or <code>player</code></td> </tr> <tr> <td><code>twitter.site</code></td> <td>string</td> <td>@username for the website used in the card footer</td> </tr> <tr> <td><code>twitter.handle</code></td> <td>string</td> <td>@username for the content creator / author (outputs as <code>twitter:creator</code>)</td> </tr> <tr> <td><code>facebook.appId</code></td> <td>string</td> <td>Used for Facebook Insights, you must add a facebook app ID to your page to for it <a href="#facebook">More Info</a></td> </tr> <tr> <td><code>openGraph.url</code></td> <td>string</td> <td>The canonical URL of your object that will be used as its permanent ID in the graph</td> </tr> <tr> <td><code>openGraph.type</code></td> <td>string</td> <td>The type of your object. Depending on the type you specify, other properties may also be required <a href="#open-graph">More Info</a></td> </tr> <tr> <td><code>openGraph.title</code></td> <td>string</td> <td>The open graph title, this can be different than your meta title.</td> </tr> <tr> <td><code>openGraph.description</code></td> <td>string</td> <td>The open graph description, this can be different than your meta description.</td> </tr> <tr> <td><code>openGraph.images</code></td> <td>array</td> <td>An array of images (object) to be used by social media platforms, slack etc as a preview. If multiple supplied you can choose one when sharing. <a href="#open-graph-examples">See Examples</a></td> </tr> <tr> <td><code>openGraph.videos</code></td> <td>array</td> <td>An array of videos (object)</td> </tr> <tr> <td><code>openGraph.locale</code></td> <td>string</td> <td>The locale the open graph tags are marked up in. Of the format language_TERRITORY. Default is en_US.</td> </tr> <tr> <td><code>openGraph.siteName</code></td> <td>string</td> <td>If your object is part of a larger web site, the name which should be displayed for the overall site.</td> </tr> <tr> <td><code>openGraph.profile.firstName</code></td> <td>string</td> <td>Person's first name.</td> </tr> <tr> <td><code>openGraph.profile.lastName</code></td> <td>string</td> <td>Person's last name.</td> </tr> <tr> <td><code>openGraph.profile.username</code></td> <td>string</td> <td>Person's username.</td> </tr> <tr> <td><code>openGraph.profile.gender</code></td> <td>string</td> <td>Person's gender.</td> </tr> <tr> <td><code>openGraph.book.authors</code></td> <td>string[]</td> <td>Writers of the article. <a href="#open-graph-examples">See Examples</a></td> </tr> <tr> <td><code>openGraph.book.isbn</code></td> <td>string</td> <td>The <a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number">ISBN</a></td> </tr> <tr> <td><code>openGraph.book.releaseDate</code></td> <td>datetime</td> <td>The date the book was released.</td> </tr> <tr> <td><code>openGraph.book.tags</code></td> <td>string[]</td> <td>Tag words associated with this book.</td> </tr> <tr> <td><code>openGraph.article.publishedTime</code></td> <td>datetime</td> <td>When the article was first published. <a href="#open-graph-examples">See Examples</a></td> </tr> <tr> <td><code>openGraph.article.modifiedTime</code></td> <td>datetime</td> <td>When the article was last changed.</td> </tr> <tr> <td><code>openGraph.article.expirationTime</code></td> <td>datetime</td> <td>When the article is out of date after.</td> </tr> <tr> <td><code>openGraph.article.authors</code></td> <td>string[]</td> <td>Writers of the article.</td> </tr> <tr> <td><code>openGraph.article.section</code></td> <td>string</td> <td>A high-level section name. E.g. Technology</td> </tr> <tr> <td><code>openGraph.article.tags</code></td> <td>string[]</td> <td>Tag words associated with this article.</td> </tr> </tbody></table> <h4>Title Template</h4> <p>Replaces <code>%s</code> with your title string</p> <pre><code class="hljs language-js">title = <span class="hljs-string">'This is my title'</span>; titleTemplate = <span class="hljs-string">'Next SEO | %s'</span>; <span class="hljs-comment">// outputs: Next SEO | This is my title</span> </code></pre><pre><code class="hljs language-js">title = <span class="hljs-string">'This is my title'</span>; titleTemplate = <span class="hljs-string">'%s | Next SEO'</span>; <span class="hljs-comment">// outputs: This is my title | Next SEO</span> </code></pre><h4>Default Title</h4> <pre><code class="hljs language-js">title = <span class="hljs-literal">undefined</span>; titleTemplate = <span class="hljs-string">'Next SEO | %s'</span>; defaultTitle = <span class="hljs-string">'Next SEO'</span>; <span class="hljs-comment">// outputs: Next SEO</span> </code></pre><h4>No Index</h4> <p>Setting this to <code>true</code> will set <code>noindex,follow</code> (to set <code>nofollow</code>, please refer to <a href="#no-follow"><code>nofollow</code></a>). This works on a page by page basis. This property works in tandem with the <code>nofollow</code> property and together they populate the <code>robots</code> meta tag.</p> <p><strong>Note:</strong> The <code>noindex</code> and the <a href="#no-follow"><code>nofollow</code></a> properties are a little different than all the others in the sense that setting them as a default does not work as expected. This is due to the fact Next SEO already has a default of <code>index,follow</code> because <code>next-seo</code> is a SEO plugin after all. So if you want to globally these properties, please see <a href="#dangerouslySetAllPagesToNoIndex">dangerouslySetAllPagesToNoIndex</a> and <a href="#dangerouslySetAllPagesToNoFollow">dangerouslySetAllPagesToNoFollow</a>.</p> <p><strong>Example No Index on a single page:</strong></p> <p>If you have a single page that you want no indexed you can achieve this by:</p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">noindex</span>=<span class="hljs-string">{true}</span> /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>This page is no indexed<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; <span class="hljs-comment">/* <meta name="robots" content="noindex,follow"> */</span> </code></pre><h4>dangerouslySetAllPagesToNoIndex</h4> <p>It has the prefix <code>dangerously</code> because it will <code>noindex</code> all pages. As this is an SEO plugin, that is kinda dangerous action. It is <strong>not</strong> bad to use this. Just please be sure you want to <code>noindex</code> <strong>EVERY</strong> page. You can still override this at a page level if you have a use case to <code>index</code> a page. This can be done by setting <code>noindex: false</code>.</p> <p>The only way to unset this is by removing the prop from the <code>DefaultSeo</code> in your custom <code><App></code>.</p> <h4>No Follow</h4> <p>Setting this to <code>true</code> will set <code>index,nofollow</code> (to set <code>noindex</code>, please refer to <a href="#no-index"><code>noindex</code></a>). This works on a page-by-page basis. This property works in tandem with the <code>noindex</code> property, and together, they populate the <code>robots</code> meta tag.</p> <p><strong>Note:</strong> Unlike for the other properties, setting <code>noindex</code> and <code>nofollow</code> by default does not work as expected. This is because Next SEO has a default of <code>index,follow</code>, since <code>next-seo</code> is an SEO plugin after all. If you want to globally allow these properties, see <a href="#dangerouslySetAllPagesToNoIndex">dangerouslySetAllPagesToNoIndex</a> and <a href="#dangerouslySetAllPagesToNoFollow">dangerouslySetAllPagesToNoFollow</a>.</p> <p><strong>Example No Follow on a single page:</strong></p> <p>If you have a single page that you want no indexed you can achieve this by:</p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">nofollow</span>=<span class="hljs-string">{true}</span> /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>This page is not followed<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; <span class="hljs-comment">/* <meta name="robots" content="index,nofollow"> */</span> </code></pre><h4>dangerouslySetAllPagesToNoFollow</h4> <p>It has the prefix of <code>dangerously</code> because it will <code>nofollow</code> all pages. As this is an SEO plugin, that is kinda dangerous action. It is <strong>not</strong> bad to use this. Just please be sure you want to <code>nofollow</code> <strong>EVERY</strong> page. You can still override this at a page level if you have a use case to <code>follow</code> a page. This can be done by setting <code>nofollow: false</code>.</p> <p>The only way to unset this, is by removing the prop from the <code>DefaultSeo</code> in your custom <code><App></code>.</p> <table> <thead> <tr> <th><code>noindex</code></th> <th><code>nofollow</code></th> <th><code>meta</code> content of <code>robots</code></th> </tr> </thead> <tbody><tr> <td>--</td> <td>--</td> <td><code>index,follow</code> (default)</td> </tr> <tr> <td>false</td> <td>false</td> <td><code>index,follow</code></td> </tr> <tr> <td>true</td> <td>--</td> <td><code>noindex,follow</code></td> </tr> <tr> <td>true</td> <td>false</td> <td><code>noindex,follow</code></td> </tr> <tr> <td>--</td> <td>true</td> <td><code>index,nofollow</code></td> </tr> <tr> <td>false</td> <td>true</td> <td><code>index,nofollow</code></td> </tr> <tr> <td>true</td> <td>true</td> <td><code>noindex,nofollow</code></td> </tr> </tbody></table> <h4>robotsProps</h4> <p>In addition to <code>index, follow</code> the <code>robots</code> meta tag accepts more properties to archive a more accurate crawling and serve better snippets for SEO bots that crawl your page.</p> <p>Example:</p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">robotsProps</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">nosnippet:</span> <span class="hljs-attr">true</span>, <span class="hljs-attr">notranslate:</span> <span class="hljs-attr">true</span>, <span class="hljs-attr">noimageindex:</span> <span class="hljs-attr">true</span>, <span class="hljs-attr">noarchive:</span> <span class="hljs-attr">true</span>, <span class="hljs-attr">maxSnippet:</span> <span class="hljs-attr">-1</span>, <span class="hljs-attr">maxImagePreview:</span> '<span class="hljs-attr">none</span>', <span class="hljs-attr">maxVideoPreview:</span> <span class="hljs-attr">-1</span>, }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Additional robots props in Next-SEO!!<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; <span class="hljs-comment">/* <meta name="robots" content="index,follow,nosnippet,max-snippet:-1,max-image-preview:none,noarchive,noimageindex,max-video-preview:-1,notranslate"> */</span> </code></pre><p><strong>Available properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody><tr> <td><code>noarchive</code></td> <td>boolean</td> <td>Do not show a <a href="https://support.google.com/websearch/answer/1687222">cached link</a> in search results.</td> </tr> <tr> <td><code>nosnippet</code></td> <td>boolean</td> <td>Do not show a text snippet or video preview in the search results for this page.</td> </tr> <tr> <td><code>max-snippet</code></td> <td>number</td> <td>Use a maximum of [number] characters as a textual snippet for this search result. <a href="https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives">Read more</a></td> </tr> <tr> <td><code>max-image-preview</code></td> <td>'none','standard','large'</td> <td>Set the maximum size of an image preview for this page in a search results.</td> </tr> <tr> <td><code>max-video-preview</code></td> <td>number</td> <td>Use a maximum of [number] seconds as a video snippet for videos on this page in search results. <a href="https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives">Read more</a></td> </tr> <tr> <td><code>notranslate</code></td> <td>boolean</td> <td>Do not offer translation of this page in search results.</td> </tr> <tr> <td><code>noimageindex</code></td> <td>boolean</td> <td>Do not index images on this page.</td> </tr> <tr> <td><code>unavailable_after</code></td> <td>string</td> <td>Do not show this page in search results after the specified date/time. The date/time must be specified in a widely adopted format including, but not limited to RFC 822, RFC 850, and ISO 8601.</td> </tr> </tbody></table> <p>For more reference about the <code>X-Robots-Tag</code> visit <a href="https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives">Google Search Central - Control Crawling and Indexing</a></p> <h4>Twitter</h4> <p>Twitter will read the <code>og:title</code>, <code>og:image</code> and <code>og:description</code> tags for their card, this is why <code>next-seo</code> omits <code>twitter:title</code>, <code>twitter:image</code> and <code>twitter:description</code> so not to duplicate.</p> <p>Some tools may report this as an error. See <a href="https://github.com/garmeeh/next-seo/issues/14">Issue #14</a></p> <h4>Facebook</h4> <pre><code class="hljs language-jsx">facebook={{ <span class="hljs-attr">appId</span>: <span class="hljs-string">'1234567890'</span>, }} </code></pre><p>Add this to your SEO config to include the fb:app_id meta if you need to enable Facebook insights for your site. Information regarding this can be found in Facebook's <a href="https://developers.facebook.com/docs/sharing/webmasters/">documentation</a></p> <h4>Canonical URL</h4> <p>Add this on a page-per-page basis when you want to consolidate duplicate URLs.</p> <pre><code class="hljs language-js">canonical = <span class="hljs-string">'https://www.canonical.ie/'</span>; </code></pre><h4>Alternate</h4> <p>This link relation is used to indicate a relation between a desktop and a mobile website to search engines.</p> <p>Example:</p> <pre><code class="hljs language-jsx">mobileAlternate={{ <span class="hljs-attr">media</span>: <span class="hljs-string">'only screen and (max-width: 640px)'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'https://m.canonical.ie'</span>, }} </code></pre><pre><code class="hljs language-jsx">languageAlternates={[{ <span class="hljs-attr">hrefLang</span>: <span class="hljs-string">'de-AT'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'https://www.canonical.ie/de'</span>, }]} </code></pre><h4>Additional Meta Tags</h4> <p>This allows you to add any other meta tags that are not covered in the <code>config</code> and should be used instead of <code>children</code> prop.</p> <p><code>content</code> is required. Then either <code>name</code>, <code>property</code> or <code>httpEquiv</code>. (Only one on each)</p> <p>Example:</p> <pre><code class="hljs language-js">additionalMetaTags={[{ <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Jane Doe'</span> }, { <span class="hljs-attr">name</span>: <span class="hljs-string">'application-name'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'NextSeo'</span> }, { <span class="hljs-attr">httpEquiv</span>: <span class="hljs-string">'x-ua-compatible'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'IE=edge; chrome=1'</span> }]} </code></pre><p>Invalid Examples:</p> <p>These are invalid as they contain more than one of <code>name</code>, <code>property</code> and <code>httpEquiv</code> on the same entry.</p> <pre><code class="hljs language-js">additionalMetaTags={[{ <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">name</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Jane Doe'</span> }, { <span class="hljs-attr">property</span>: <span class="hljs-string">'application-name'</span>, <span class="hljs-attr">httpEquiv</span>: <span class="hljs-string">'application-name'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'NextSeo'</span> }]} </code></pre><p>One thing to note on this is that it currently only supports unique tags unless you use the <code>keyOverride</code> prop to provide a unique <a href="https://reactjs.org/docs/lists-and-keys.html#keys">key</a> to each additional meta tag.</p> <p>The default behaviour (without a <code>keyOverride</code> prop) is to render one tag per unique <code>name</code> / <code>property</code> / <code>httpEquiv</code>. The last one defined will be rendered.</p> <p>For example, if you pass 2 tags with the same <code>property</code>:</p> <pre><code class="hljs language-js">additionalMetaTags={[{ <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Joe Bloggs'</span> }, { <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Jane Doe'</span> }]} </code></pre><p>it will result in this being rendered:</p> <pre><code class="hljs language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"dc:creator"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"Jane Doe"</span> /></span> </code></pre><p>Providing an additional <code>keyOverride</code> property like this:</p> <pre><code class="hljs language-js">additionalMetaTags={[{ <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Joe Bloggs'</span>, <span class="hljs-attr">keyOverride</span>: <span class="hljs-string">'creator1'</span>, }, { <span class="hljs-attr">property</span>: <span class="hljs-string">'dc:creator'</span>, <span class="hljs-attr">content</span>: <span class="hljs-string">'Jane Doe'</span>, <span class="hljs-attr">keyOverride</span>: <span class="hljs-string">'creator2'</span>, }]} </code></pre><p>results in the correct HTML being rendered:</p> <pre><code class="hljs language-html"><span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"dc:creator"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"Joe Bloggs"</span> /></span> <span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">property</span>=<span class="hljs-string">"dc:creator"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"Jane Doe"</span> /></span> </code></pre><h4>Additional Link Tags</h4> <p>This allows you to add any other link tags that are not covered in the <code>config</code>.</p> <p><code>rel</code> and <code>href</code> is required.</p> <p>Example:</p> <pre><code class="hljs language-js">additionalLinkTags={[ { <span class="hljs-attr">rel</span>: <span class="hljs-string">'icon'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'https://www.test.ie/favicon.ico'</span>, }, { <span class="hljs-attr">rel</span>: <span class="hljs-string">'apple-touch-icon'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'https://www.test.ie/touch-icon-ipad.jpg'</span>, <span class="hljs-attr">sizes</span>: <span class="hljs-string">'76x76'</span> }, { <span class="hljs-attr">rel</span>: <span class="hljs-string">'manifest'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'/manifest.json'</span> }, { <span class="hljs-attr">rel</span>: <span class="hljs-string">'preload'</span>, <span class="hljs-attr">href</span>: <span class="hljs-string">'https://www.test.ie/font/sample-font.woof2'</span>, <span class="hljs-attr">as</span>: <span class="hljs-string">'font'</span>, <span class="hljs-attr">type</span>: <span class="hljs-string">'font/woff2'</span>, <span class="hljs-attr">crossOrigin</span>: <span class="hljs-string">'anonymous'</span> } ]} </code></pre><p>it will result in this being rendered:</p> <pre><code class="hljs language-html"><span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.test.ie/favicon.ico"</span> /></span> <span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"apple-touch-icon"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.test.ie/touch-icon-ipad.jpg"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"76x76"</span> /></span> <span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"manifest"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/manifest.json"</span> /></span> <span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"preload"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://www.test.ie/font/sample-font.woof2"</span> <span class="hljs-attr">as</span>=<span class="hljs-string">"font"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"font/woff2"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span> /></span> </code></pre><h2>Open Graph</h2> <p>For the full specification please check out <a href="http://ogp.me/">http://ogp.me/</a></p> <p>Next SEO currently supports:</p> <ul> <li><a href="#basic">basic</a></li> <li><a href="#video">video</a></li> <li><a href="#article">article</a></li> <li><a href="#book">book</a></li> <li><a href="#profile">profile</a></li> </ul> <h3>Open Graph Examples</h3> <h4>Basic</h4> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">type:</span> '<span class="hljs-attr">website</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">page</span>', <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Description</span>', <span class="hljs-attr">images:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">800</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">600</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Og</span> <span class="hljs-attr">Image</span> <span class="hljs-attr">Alt</span>', }, { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.ie</span>/<span class="hljs-attr">og-image-2.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">800</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">600</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Og</span> <span class="hljs-attr">Image</span> <span class="hljs-attr">Alt</span> <span class="hljs-attr">2</span>', }, ], }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Basic<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Note</strong></p> <p>Multiple images are available from next.js version <code>7.0.0-canary.0</code></p> <p>For versions <code>6.0.0</code> - <code>7.0.0-canary.0</code> you just need to supply a single item array:</p> <pre><code class="hljs language-js"><span class="hljs-attr">images</span>: [ { <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.example.ie/og-image-01.jpg'</span>, <span class="hljs-attr">width</span>: <span class="hljs-number">800</span>, <span class="hljs-attr">height</span>: <span class="hljs-number">600</span>, <span class="hljs-attr">alt</span>: <span class="hljs-string">'Og Image Alt'</span>, }, ], </code></pre><p>Supplying multiple images will not break anything, but only one will be added to the head.</p> <h4>Video</h4> <p>Full info on <a href="http://ogp.me/#type_video">http://ogp.me/</a></p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Video Page Title"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"Description of video page"</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Video</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Description</span> <span class="hljs-attr">of</span> <span class="hljs-attr">open</span> <span class="hljs-attr">graph</span> <span class="hljs-attr">video</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">videos</span>/<span class="hljs-attr">video-title</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">video.movie</span>', <span class="hljs-attr">video:</span> { // <span class="hljs-attr">Multiple</span> <span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">actors</span> <span class="hljs-attr">is</span> <span class="hljs-attr">only</span> <span class="hljs-attr">available</span> <span class="hljs-attr">in</span> <span class="hljs-attr">version</span> `<span class="hljs-attr">7.0.2-canary.35</span>`+ <span class="hljs-attr">of</span> <span class="hljs-attr">next</span> <span class="hljs-attr">actors:</span> [ { <span class="hljs-attr">profile:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">actors</span>/@<span class="hljs-attr">firstnameA-lastnameA</span>', <span class="hljs-attr">role:</span> '<span class="hljs-attr">Protagonist</span>', }, { <span class="hljs-attr">profile:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">actors</span>/@<span class="hljs-attr">firstnameB-lastnameB</span>', <span class="hljs-attr">role:</span> '<span class="hljs-attr">Antagonist</span>', }, ], // <span class="hljs-attr">Multiple</span> <span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">directors</span> <span class="hljs-attr">is</span> <span class="hljs-attr">only</span> <span class="hljs-attr">available</span> <span class="hljs-attr">in</span> <span class="hljs-attr">version</span> `<span class="hljs-attr">7.0.2-canary.35</span>`+ <span class="hljs-attr">of</span> <span class="hljs-attr">next</span> <span class="hljs-attr">directors:</span> [ '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">directors</span>/@<span class="hljs-attr">firstnameA-lastnameA</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">directors</span>/@<span class="hljs-attr">firstnameB-lastnameB</span>', ], // <span class="hljs-attr">Multiple</span> <span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">writers</span> <span class="hljs-attr">is</span> <span class="hljs-attr">only</span> <span class="hljs-attr">available</span> <span class="hljs-attr">in</span> <span class="hljs-attr">version</span> `<span class="hljs-attr">7.0.2-canary.35</span>`+ <span class="hljs-attr">of</span> <span class="hljs-attr">next</span> <span class="hljs-attr">writers:</span> [ '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">writers</span>/@<span class="hljs-attr">firstnameA-lastnameA</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">writers</span>/@<span class="hljs-attr">firstnameB-lastnameB</span>', ], <span class="hljs-attr">duration:</span> <span class="hljs-attr">680000</span>, <span class="hljs-attr">releaseDate:</span> '<span class="hljs-attr">2022-12-21T22:04:11Z</span>', // <span class="hljs-attr">Multiple</span> <span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">tags</span> <span class="hljs-attr">is</span> <span class="hljs-attr">only</span> <span class="hljs-attr">available</span> <span class="hljs-attr">in</span> <span class="hljs-attr">version</span> `<span class="hljs-attr">7.0.2-canary.35</span>`+ <span class="hljs-attr">of</span> <span class="hljs-attr">next</span> <span class="hljs-attr">tags:</span> ['<span class="hljs-attr">Tag</span> <span class="hljs-attr">A</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">B</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">C</span>'], }, <span class="hljs-attr">siteName:</span> '<span class="hljs-attr">SiteName</span>', }} /></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Video Page SEO<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Note</strong></p> <p>Multiple images are available from next.js version <code>7.0.0-canary.0</code></p> <p>For versions <code>6.0.0</code> - <code>7.0.0-canary.0</code> you just need to supply a single item array:</p> <pre><code class="hljs language-js"><span class="hljs-attr">images</span>: [ { <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.example.ie/og-image-01.jpg'</span>, <span class="hljs-attr">width</span>: <span class="hljs-number">800</span>, <span class="hljs-attr">height</span>: <span class="hljs-number">600</span>, <span class="hljs-attr">alt</span>: <span class="hljs-string">'Og Image Alt'</span>, }, ], </code></pre><p>Supplying multiple images will not break anything, but only one will be added to the head.</p> <h4>Audio</h4> <p>Full info on <a href="https://ogp.me/#structured">http://ogp.me/</a></p> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Audio Page Title"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"Description of audio page"</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Audio</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Description</span> <span class="hljs-attr">of</span> <span class="hljs-attr">open</span> <span class="hljs-attr">graph</span> <span class="hljs-attr">audio</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">audio</span>/<span class="hljs-attr">audio</span>', <span class="hljs-attr">audio:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">http:</span>//<span class="hljs-attr">examples.opengraphprotocol.us</span>/<span class="hljs-attr">media</span>/<span class="hljs-attr">audio</span>/<span class="hljs-attr">1khz.mp3</span>', <span class="hljs-attr">secureUrl:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">d72cgtgi6hvvl.cloudfront.net</span>/<span class="hljs-attr">media</span>/<span class="hljs-attr">audio</span>/<span class="hljs-attr">1khz.mp3</span>', <span class="hljs-attr">type:</span> "<span class="hljs-attr">audio</span>/<span class="hljs-attr">mpeg</span>" }, { <span class="hljs-attr">url:</span> '<span class="hljs-attr">http:</span>//<span class="hljs-attr">examples.opengraphprotocol.us</span>/<span class="hljs-attr">media</span>/<span class="hljs-attr">audio</span>/<span class="hljs-attr">250hz.mp3</span>', <span class="hljs-attr">secureUrl:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">d72cgtgi6hvvl.cloudfront.net</span>/<span class="hljs-attr">media</span>/<span class="hljs-attr">audio</span>/<span class="hljs-attr">250hz.mp3</span>', <span class="hljs-attr">type:</span> "<span class="hljs-attr">audio</span>/<span class="hljs-attr">mpeg</span>" }, ] <span class="hljs-attr">site_name:</span> '<span class="hljs-attr">SiteName</span>', }} /></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Audio Page SEO<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><h4>Article</h4> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Article</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Description</span> <span class="hljs-attr">of</span> <span class="hljs-attr">open</span> <span class="hljs-attr">graph</span> <span class="hljs-attr">article</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">articles</span>/<span class="hljs-attr">article-title</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">article</span>', <span class="hljs-attr">article:</span> { <span class="hljs-attr">publishedTime:</span> '<span class="hljs-attr">2017-06-21T23:04:13Z</span>', <span class="hljs-attr">modifiedTime:</span> '<span class="hljs-attr">2018-01-21T18:04:43Z</span>', <span class="hljs-attr">expirationTime:</span> '<span class="hljs-attr">2022-12-21T22:04:11Z</span>', <span class="hljs-attr">section:</span> '<span class="hljs-attr">Section</span> <span class="hljs-attr">II</span>', <span class="hljs-attr">authors:</span> [ '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">authors</span>/@<span class="hljs-attr">firstnameA-lastnameA</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">authors</span>/@<span class="hljs-attr">firstnameB-lastnameB</span>', ], <span class="hljs-attr">tags:</span> ['<span class="hljs-attr">Tag</span> <span class="hljs-attr">A</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">B</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">C</span>'], }, <span class="hljs-attr">images:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.test.ie</span>/<span class="hljs-attr">images</span>/<span class="hljs-attr">cover.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">850</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">650</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Photo</span> <span class="hljs-attr">of</span> <span class="hljs-attr">text</span>', }, ], }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Article<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Note</strong></p> <p>Multiple images, authors, and tags are available from next.js version <code>7.0.0-canary.0</code></p> <p>For versions <code>6.0.0</code> - <code>7.0.0-canary.0</code> you just need to supply a single item array:</p> <p><code>images:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">images</span>: [ { <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.example.ie/og-image-01.jpg'</span>, <span class="hljs-attr">width</span>: <span class="hljs-number">800</span>, <span class="hljs-attr">height</span>: <span class="hljs-number">600</span>, <span class="hljs-attr">alt</span>: <span class="hljs-string">'Og Image Alt'</span>, }, ], </code></pre><p><code>authors:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">authors</span>: [ <span class="hljs-string">'https://www.example.com/authors/@firstnameA-lastnameA'</span>, ], </code></pre><p><code>tags:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">tags</span>: [<span class="hljs-string">'Tag A'</span>], </code></pre><p>Supplying multiple of any of the above will not break anything, but only one will be added to the head.</p> <h4>Book</h4> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Book</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Description</span> <span class="hljs-attr">of</span> <span class="hljs-attr">open</span> <span class="hljs-attr">graph</span> <span class="hljs-attr">book</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">books</span>/<span class="hljs-attr">book-title</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">book</span>', <span class="hljs-attr">book:</span> { <span class="hljs-attr">releaseDate:</span> '<span class="hljs-attr">2018-09-17T11:08:13Z</span>', <span class="hljs-attr">isbn:</span> '<span class="hljs-attr">978-3-16-148410-0</span>', <span class="hljs-attr">authors:</span> [ '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">authors</span>/@<span class="hljs-attr">firstnameA-lastnameA</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">authors</span>/@<span class="hljs-attr">firstnameB-lastnameB</span>', ], <span class="hljs-attr">tags:</span> ['<span class="hljs-attr">Tag</span> <span class="hljs-attr">A</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">B</span>', '<span class="hljs-attr">Tag</span> <span class="hljs-attr">C</span>'], }, <span class="hljs-attr">images:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.test.ie</span>/<span class="hljs-attr">images</span>/<span class="hljs-attr">book.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">850</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">650</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Cover</span> <span class="hljs-attr">of</span> <span class="hljs-attr">the</span> <span class="hljs-attr">book</span>', }, ], }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Book<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Note</strong></p> <p>Multiple images, authors, and tags are available from next.js version <code>7.0.0-canary.0</code></p> <p>For versions <code>6.0.0</code> - <code>7.0.0-canary.0</code> you just need to supply a single item array:</p> <p><code>images:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">images</span>: [ { <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.example.ie/og-image-01.jpg'</span>, <span class="hljs-attr">width</span>: <span class="hljs-number">800</span>, <span class="hljs-attr">height</span>: <span class="hljs-number">600</span>, <span class="hljs-attr">alt</span>: <span class="hljs-string">'Og Image Alt'</span>, }, ], </code></pre><p><code>authors:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">authors</span>: [ <span class="hljs-string">'https://www.example.com/authors/@firstnameA-lastnameA'</span>, ], </code></pre><p><code>tags:</code></p> <pre><code class="hljs language-js"><span class="hljs-attr">tags</span>: [<span class="hljs-string">'Tag A'</span>], </code></pre><p>Supplying multiple of any of the above will not break anything, but only one will be added to the head.</p> <h4>Profile</h4> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextSeo</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">NextSeo</span> <span class="hljs-attr">openGraph</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">title:</span> '<span class="hljs-attr">Open</span> <span class="hljs-attr">Graph</span> <span class="hljs-attr">Profile</span> <span class="hljs-attr">Title</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">Description</span> <span class="hljs-attr">of</span> <span class="hljs-attr">open</span> <span class="hljs-attr">graph</span> <span class="hljs-attr">profile</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.example.com</span>/@<span class="hljs-attr">firstlast123</span>', <span class="hljs-attr">type:</span> '<span class="hljs-attr">profile</span>', <span class="hljs-attr">profile:</span> { <span class="hljs-attr">firstName:</span> '<span class="hljs-attr">First</span>', <span class="hljs-attr">lastName:</span> '<span class="hljs-attr">Last</span>', <span class="hljs-attr">username:</span> '<span class="hljs-attr">firstlast123</span>', <span class="hljs-attr">gender:</span> '<span class="hljs-attr">female</span>', }, <span class="hljs-attr">images:</span> [ { <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">www.test.ie</span>/<span class="hljs-attr">images</span>/<span class="hljs-attr">profile.jpg</span>', <span class="hljs-attr">width:</span> <span class="hljs-attr">850</span>, <span class="hljs-attr">height:</span> <span class="hljs-attr">650</span>, <span class="hljs-attr">alt:</span> '<span class="hljs-attr">Profile</span> <span class="hljs-attr">Photo</span>', }, ], }} /></span> <span class="hljs-tag"><<span class="hljs-name">p</span>></span>Profile<span class="hljs-tag"></<span class="hljs-name">p</span>></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Note</strong></p> <p>Multiple images are available from next.js version <code>7.0.0-canary.0</code></p> <p>For versions <code>6.0.0</code> - <code>7.0.0-canary.0</code> you just need to supply a single item array:</p> <pre><code class="hljs language-js"><span class="hljs-attr">images</span>: [ { <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.example.ie/og-image-01.jpg'</span>, <span class="hljs-attr">width</span>: <span class="hljs-number">800</span>, <span class="hljs-attr">height</span>: <span class="hljs-number">600</span>, <span class="hljs-attr">alt</span>: <span class="hljs-string">'Og Image Alt'</span>, }, ], </code></pre><p>Supplying multiple images will not break anything, but only one will be added to the head.</p> <h2>JSON-LD</h2> <p>Next SEO now has the ability to set JSON-LD a form of structured data. Structured data is a standardized format for providing information about a page and classifying the page content.</p> <p>Google has excellent content on JSON-LD -> <a href="https://developers.google.com/search/docs/data-types/article">HERE</a></p> <p><strong>If using the app directory then please ensure to add <code>useAppDir={true}</code> prop and that you are using the component in the <code>page.js</code></strong></p> <p>Below you will find a very basic page implementing each of the available JSON-LD types:</p> <ul> <li><a href="#article-1">Article</a></li> <li><a href="#breadcrumb">Breadcrumb</a></li> <li><a href="#blog">Blog</a></li> <li><a href="#campground">Campground</a></li> <li><a href="#recipe">Recipe</a></li> <li><a href="#sitelinks-search-box">Sitelinks Search Box</a></li> <li><a href="#course">Course</a></li> <li><a href="#dataset">Dataset</a></li> <li><a href="#corporate-contact">Corporate Contact</a></li> <li><a href="#faq-page">FAQ Page</a></li> <li><a href="#how-to">How-to</a></li> <li><a href="#job-posting">Job Posting</a></li> <li><a href="#local-business">Local Business</a></li> <li><a href="#product">Product</a></li> <li><a href="#social-profile">Social Profile</a></li> <li><a href="#news-article">News Article</a></li> <li><a href="#park">Park</a></li> </ul> <p>Pull requests are very welcome to add any from the list <a href="https://developers.google.com/search/docs/data-types/article">found here</a></p> <h4>JSON-LD Security</h4> <p>Just a quick note on security. To get JSON-LD onto the page it needs to be in a script tag. <code>next-seo</code> achieves this by using a script tag with <code>dangerouslySetInnerHTML</code>.</p> <p>So if passing anything directly from a URL to one of the components below please ensure you sanitize it first if needed.</p> <p>View <code>toJson.tsx</code> for implementation detail.</p> <h4>Handling multiple instances</h4> <p>If your page requires multiple instances of a given JSON-LD component, you can specify unique <code>keyOverride</code> properties, and <code>next-seo</code> will handle the rest.</p> <p>This comes in handy for blog rolls, search results, and overview pages.</p> <p>Please fully research when you should and shouldn't add multiple instances of JSON-LD.</p> <pre><code class="hljs language-jsx"><<span class="hljs-title class_">ExampleJsonLd</span> keyOverride=<span class="hljs-string">"my-new-key"</span> /> </code></pre><h3>Article</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">ArticleJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Article JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">ArticleJsonLd</span> <span class="hljs-attr">useAppDir</span>=<span class="hljs-string">{false}</span> <span class="hljs-attr">url</span>=<span class="hljs-string">"https://example.com/article"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Article headline"</span> <span class="hljs-attr">images</span>=<span class="hljs-string">{[</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">1x1</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">4x3</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">16x9</span>/<span class="hljs-attr">photo.jpg</span>', ]} <span class="hljs-attr">datePublished</span>=<span class="hljs-string">"2015-02-05T08:00:00+08:00"</span> <span class="hljs-attr">dateModified</span>=<span class="hljs-string">"2015-02-05T09:00:00+08:00"</span> <span class="hljs-attr">authorName</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">name:</span> '<span class="hljs-attr">Jane</span> <span class="hljs-attr">Blogs</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>', }, { <span class="hljs-attr">name:</span> '<span class="hljs-attr">Mary</span> <span class="hljs-attr">Stone</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>', }, ]} <span class="hljs-attr">publisherName</span>=<span class="hljs-string">"Gary Meehan"</span> <span class="hljs-attr">publisherLogo</span>=<span class="hljs-string">"https://www.example.com/photos/logo.jpg"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"This is a mighty good description of this article."</span> <span class="hljs-attr">isAccessibleForFree</span>=<span class="hljs-string">{true}</span> /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><h3>Breadcrumb</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">BreadcrumbJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Breadcrumb JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">BreadcrumbJsonLd</span> <span class="hljs-attr">itemListElements</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">position:</span> <span class="hljs-attr">1</span>, <span class="hljs-attr">name:</span> '<span class="hljs-attr">Books</span>', <span class="hljs-attr">item:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">books</span>', }, { <span class="hljs-attr">position:</span> <span class="hljs-attr">2</span>, <span class="hljs-attr">name:</span> '<span class="hljs-attr">Authors</span>', <span class="hljs-attr">item:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">books</span>/<span class="hljs-attr">authors</span>', }, { <span class="hljs-attr">position:</span> <span class="hljs-attr">3</span>, <span class="hljs-attr">name:</span> '<span class="hljs-attr">Ann</span> <span class="hljs-attr">Leckie</span>', <span class="hljs-attr">item:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">books</span>/<span class="hljs-attr">authors</span>/<span class="hljs-attr">annleckie</span>', }, { <span class="hljs-attr">position:</span> <span class="hljs-attr">4</span>, <span class="hljs-attr">name:</span> '<span class="hljs-attr">Ancillary</span> <span class="hljs-attr">Justice</span>', <span class="hljs-attr">item:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">books</span>/<span class="hljs-attr">authors</span>/<span class="hljs-attr">ancillaryjustice</span>', }, ]} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>itemListElements</code></td> <td></td> </tr> <tr> <td><code>itemListElements.position</code></td> <td>The position of the breadcrumb in the breadcrumb trail. Position 1 signifies the beginning of the trail.</td> </tr> <tr> <td><code>itemListElements.name</code></td> <td>The title of the breadcrumb displayed for the user.</td> </tr> <tr> <td><code>itemListElements.item</code></td> <td>The URL to the webpage that represents the breadcrumb.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>Blog</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">ArticleJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Blog JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">ArticleJsonLd</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"BlogPosting"</span> <span class="hljs-attr">url</span>=<span class="hljs-string">"https://example.com/blog"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"Blog headline"</span> <span class="hljs-attr">images</span>=<span class="hljs-string">{[</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">1x1</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">4x3</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">16x9</span>/<span class="hljs-attr">photo.jpg</span>', ]} <span class="hljs-attr">datePublished</span>=<span class="hljs-string">"2015-02-05T08:00:00+08:00"</span> <span class="hljs-attr">dateModified</span>=<span class="hljs-string">"2015-02-05T09:00:00+08:00"</span> <span class="hljs-attr">authorName</span>=<span class="hljs-string">"Jane Blogs"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"This is a mighty good description of this blog."</span> /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><h3>Campground</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">CampgroundJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Campground JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">CampgroundJsonLd</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"https://www.example.com/campground/rip-van-winkle-campground"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Rip Van Winkle Campgrounds"</span> <span class="hljs-attr">url</span>=<span class="hljs-string">"https://www.example.com/campground"</span> <span class="hljs-attr">telephone</span>=<span class="hljs-string">"+18452468114"</span> <span class="hljs-attr">images</span>=<span class="hljs-string">{[</span>'<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">1x1</span>/<span class="hljs-attr">photo.jpg</span>']} <span class="hljs-attr">address</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">streetAddress:</span> '<span class="hljs-attr">149</span> <span class="hljs-attr">Blue</span> <span class="hljs-attr">Mountain</span> <span class="hljs-attr">Rd</span>', <span class="hljs-attr">addressLocality:</span> '<span class="hljs-attr">Saugerties</span>', <span class="hljs-attr">addressRegion:</span> '<span class="hljs-attr">NY</span>', <span class="hljs-attr">postalCode:</span> '<span class="hljs-attr">12477</span>', <span class="hljs-attr">addressCountry:</span> '<span class="hljs-attr">US</span>', }} <span class="hljs-attr">description</span>=<span class="hljs-string">"Description about Rip Van Winkle Campgrounds"</span> <span class="hljs-attr">geo</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">latitude:</span> '<span class="hljs-attr">42.092599</span>', <span class="hljs-attr">longitude:</span> '<span class="hljs-attr">-74.018580</span>', }} <span class="hljs-attr">openingHours</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">opens:</span> '<span class="hljs-attr">09:00</span>', <span class="hljs-attr">closes:</span> '<span class="hljs-attr">17:00</span>', <span class="hljs-attr">dayOfWeek:</span> [ '<span class="hljs-attr">Monday</span>', '<span class="hljs-attr">Tuesday</span>', '<span class="hljs-attr">Wednesday</span>', '<span class="hljs-attr">Thursday</span>', '<span class="hljs-attr">Friday</span>', '<span class="hljs-attr">Saturday</span>', '<span class="hljs-attr">Sunday</span>', ], <span class="hljs-attr">validFrom:</span> '<span class="hljs-attr">2019-12-23</span>', <span class="hljs-attr">validThrough:</span> '<span class="hljs-attr">2020-04-02</span>', }, ]} <span class="hljs-attr">petsAllowed</span> <span class="hljs-attr">rating</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">ratingValue:</span> '<span class="hljs-attr">5</span>', <span class="hljs-attr">ratingCount:</span> '<span class="hljs-attr">18</span>', }} <span class="hljs-attr">amenityFeature</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">name:</span> '<span class="hljs-attr">Showers</span>', <span class="hljs-attr">value:</span> <span class="hljs-attr">true</span>, }} <span class="hljs-attr">priceRange</span>=<span class="hljs-string">"$$"</span> /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>@id</code></td> <td>Globally unique ID of the specific campground in the form of a URL.</td> </tr> <tr> <td><code>address</code></td> <td>Address of the specific campground location</td> </tr> <tr> <td><code>address.addressCountry</code></td> <td>The 2-letter ISO 3166-1 alpha-2 country code</td> </tr> <tr> <td><code>address.addressLocality</code></td> <td>City</td> </tr> <tr> <td><code>address.addressRegion</code></td> <td>State or province, if applicable.</td> </tr> <tr> <td><code>address.postalCode</code></td> <td>Postal or zip code.</td> </tr> <tr> <td><code>address.streetAddress</code></td> <td>Street number, street name, and unit number.</td> </tr> <tr> <td><code>name</code></td> <td>Campground name.</td> </tr> <tr> <td><code>description</code></td> <td>Campground description.</td> </tr> </tbody></table> <p><strong>Supported properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>geo</code></td> <td>Geographic coordinates of the campground.</td> </tr> <tr> <td><code>geo.latitude</code></td> <td>The latitude of the campground location</td> </tr> <tr> <td><code>geo.longitude</code></td> <td>The longitude of the campground location</td> </tr> <tr> <td><code>images</code></td> <td>An image or images of the campground. Required for valid markup depending on the type</td> </tr> <tr> <td><code>telephone</code></td> <td>A campground phone number meant to be the primary contact method for customers.</td> </tr> <tr> <td><code>url</code></td> <td>The fully-qualified URL of the specific campground.</td> </tr> <tr> <td><code>openingHours</code></td> <td>Opening hour specification of the campground. You can provide this as a single object, or an array of objects with the properties below.</td> </tr> <tr> <td><code>openingHours.opens</code></td> <td>The opening hour of the place or service on the given day(s) of the week.</td> </tr> <tr> <td><code>openingHours.closes</code></td> <td>The closing hour of the place or service on the given day(s) of the week.</td> </tr> <tr> <td><code>openingHours.dayOfWeek</code></td> <td>The day of the week for which these opening hours are valid. Can be a string or array of strings. Refer to <a href="https://schema.org/DayOfWeek">DayOfWeek</a></td> </tr> <tr> <td><code>openingHours.validFrom</code></td> <td>The date when the item becomes valid.</td> </tr> <tr> <td><code>openingHours.validThrough</code></td> <td>The date after when the item is not valid.</td> </tr> <tr> <td><code>isAccessibleForFree</code></td> <td>Whether or not the campground is accessible for free.</td> </tr> <tr> <td><code>petsAllowed</code></td> <td>Whether or not the campgroud allows pets.</td> </tr> <tr> <td><code>amenityFeature</code></td> <td>An amenity feature (e.g. a characteristic or service) of the campground.</td> </tr> <tr> <td><code>amenityFeature.name</code></td> <td>The name of the amenity.</td> </tr> <tr> <td><code>amenityFeature.value</code></td> <td>The value of the amenity.</td> </tr> <tr> <td><code>priceRange</code></td> <td>The price range of the campground, for example $$$.</td> </tr> <tr> <td><code>rating</code></td> <td>The average rating of the campground based on multiple ratings or reviews.</td> </tr> <tr> <td><code>rating.ratingValue</code></td> <td>The rating for the content.</td> </tr> <tr> <td><code>rating.ratingCount</code></td> <td>The count of total number of ratings.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>Recipe</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">RecipeJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Recipe JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">RecipeJsonLd</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"Party Coffee Cake"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"This coffee cake is awesome and perfect for parties."</span> <span class="hljs-attr">datePublished</span>=<span class="hljs-string">"2018-03-10"</span> <span class="hljs-attr">authorName</span>=<span class="hljs-string">{[</span>'<span class="hljs-attr">Jane</span> <span class="hljs-attr">Blogs</span>', '<span class="hljs-attr">Mary</span> <span class="hljs-attr">Stone</span>']} <span class="hljs-attr">prepTime</span>=<span class="hljs-string">"PT20M"</span> <span class="hljs-attr">cookTime</span>=<span class="hljs-string">"PT30M"</span> <span class="hljs-attr">totalTime</span>=<span class="hljs-string">"PT50M"</span> <span class="hljs-attr">keywords</span>=<span class="hljs-string">"cake for a party, coffee"</span> <span class="hljs-attr">yields</span>=<span class="hljs-string">"10"</span> <span class="hljs-attr">category</span>=<span class="hljs-string">"Dessert"</span> <span class="hljs-attr">cuisine</span>=<span class="hljs-string">"American"</span> <span class="hljs-attr">calories</span>=<span class="hljs-string">{270}</span> <span class="hljs-attr">images</span>=<span class="hljs-string">{[</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">1x1</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">4x3</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">16x9</span>/<span class="hljs-attr">photo.jpg</span>', ]} <span class="hljs-attr">ingredients</span>=<span class="hljs-string">{[</span> '<span class="hljs-attr">2</span> <span class="hljs-attr">cups</span> <span class="hljs-attr">of</span> <span class="hljs-attr">flour</span>', '<span class="hljs-attr">3</span>/<span class="hljs-attr">4</span> <span class="hljs-attr">cup</span> <span class="hljs-attr">white</span> <span class="hljs-attr">sugar</span>', '<span class="hljs-attr">2</span> <span class="hljs-attr">teaspoons</span> <span class="hljs-attr">baking</span> <span class="hljs-attr">powder</span>', '<span class="hljs-attr">1</span>/<span class="hljs-attr">2</span> <span class="hljs-attr">teaspoon</span> <span class="hljs-attr">salt</span>', '<span class="hljs-attr">1</span>/<span class="hljs-attr">2</span> <span class="hljs-attr">cup</span> <span class="hljs-attr">butter</span>', '<span class="hljs-attr">2</span> <span class="hljs-attr">eggs</span>', '<span class="hljs-attr">3</span>/<span class="hljs-attr">4</span> <span class="hljs-attr">cup</span> <span class="hljs-attr">milk</span>', ]} <span class="hljs-attr">instructions</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">name:</span> '<span class="hljs-attr">Preheat</span>', <span class="hljs-attr">text:</span> '<span class="hljs-attr">Preheat</span> <span class="hljs-attr">the</span> <span class="hljs-attr">oven</span> <span class="hljs-attr">to</span> <span class="hljs-attr">350</span> <span class="hljs-attr">degrees</span> <span class="hljs-attr">F.</span> <span class="hljs-attr">Grease</span> <span class="hljs-attr">and</span> <span class="hljs-attr">flour</span> <span class="hljs-attr">a</span> <span class="hljs-attr">9x9</span> <span class="hljs-attr">inch</span> <span class="hljs-attr">pan.</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">party-coffee-cake</span>#<span class="hljs-attr">step1</span>', <span class="hljs-attr">image:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">party-coffee-cake</span>/<span class="hljs-attr">step1.jpg</span>', }, ]} <span class="hljs-attr">aggregateRating</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">ratingValue:</span> '<span class="hljs-attr">5</span>', <span class="hljs-attr">ratingCount:</span> '<span class="hljs-attr">18</span>', }} <span class="hljs-attr">video</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">name:</span> '<span class="hljs-attr">How</span> <span class="hljs-attr">to</span> <span class="hljs-attr">make</span> <span class="hljs-attr">a</span> <span class="hljs-attr">Party</span> <span class="hljs-attr">Coffee</span> <span class="hljs-attr">Cake</span>', <span class="hljs-attr">description:</span> '<span class="hljs-attr">This</span> <span class="hljs-attr">is</span> <span class="hljs-attr">how</span> <span class="hljs-attr">you</span> <span class="hljs-attr">make</span> <span class="hljs-attr">a</span> <span class="hljs-attr">Party</span> <span class="hljs-attr">Coffee</span> <span class="hljs-attr">Cake.</span>', <span class="hljs-attr">contentUrl:</span> '<span class="hljs-attr">http:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">video123.mp4</span>', <span class="hljs-attr">embedUrl:</span> '<span class="hljs-attr">http:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">videoplayer</span>?<span class="hljs-attr">video</span>=<span class="hljs-string">123</span>', <span class="hljs-attr">uploadDate:</span> '<span class="hljs-attr">2018-02-05T08:00:00</span>+<span class="hljs-attr">08:00</span>', <span class="hljs-attr">duration:</span> '<span class="hljs-attr">PT1M33S</span>', <span class="hljs-attr">thumbnailUrls:</span> [ '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">1x1</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">4x3</span>/<span class="hljs-attr">photo.jpg</span>', '<span class="hljs-attr">https:</span>//<span class="hljs-attr">example.com</span>/<span class="hljs-attr">photos</span>/<span class="hljs-attr">16x9</span>/<span class="hljs-attr">photo.jpg</span>', ], <span class="hljs-attr">expires:</span> '<span class="hljs-attr">2019-02-05T08:00:00</span>+<span class="hljs-attr">08:00</span>', <span class="hljs-attr">hasPart:</span> { '@<span class="hljs-attr">type</span>'<span class="hljs-attr">:</span> '<span class="hljs-attr">Clip</span>', <span class="hljs-attr">name:</span> '<span class="hljs-attr">Preheat</span> <span class="hljs-attr">oven</span>', <span class="hljs-attr">startOffset:</span> <span class="hljs-attr">30</span>, <span class="hljs-attr">url:</span> '<span class="hljs-attr">http:</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">example</span>?<span class="hljs-attr">t</span>=<span class="hljs-string">30</span>', }, <span class="hljs-attr">watchCount:</span> <span class="hljs-attr">2347</span>, <span class="hljs-attr">publication:</span> { '@<span class="hljs-attr">type</span>'<span class="hljs-attr">:</span> '<span class="hljs-attr">BroadcastEvent</span>', <span class="hljs-attr">isLiveBroadcast:</span> <span class="hljs-attr">true</span>, <span class="hljs-attr">startDate:</span> '<span class="hljs-attr">2020-10-24T14:00:00</span>+<span class="hljs-attr">00:00</span>', <span class="hljs-attr">endDate:</span> '<span class="hljs-attr">2020-10-24T14:37:14</span>+<span class="hljs-attr">00:00</span>', }, <span class="hljs-attr">regionsAllowed:</span> ['<span class="hljs-attr">IT</span>', '<span class="hljs-attr">NL</span>'], }} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>name</code></td> <td>The name of the recipe</td> </tr> <tr> <td><code>description</code></td> <td>A description of the recipe</td> </tr> <tr> <td><code>authorName</code></td> <td>The name of the recipe author. Can be a string or array of strings.</td> </tr> <tr> <td><code>ingredients</code></td> <td>A list of ingredient strings</td> </tr> <tr> <td><code>instructions</code></td> <td>-</td> </tr> <tr> <td><code>instructions.name</code></td> <td>The name of the instruction step.</td> </tr> <tr> <td><code>instructions.text</code></td> <td>The directions of the instruction step.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>Sitelinks Search Box</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">SiteLinksSearchBoxJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Sitelinks Search Box JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">SiteLinksSearchBoxJsonLd</span> <span class="hljs-attr">url</span>=<span class="hljs-string">"https://www.example.com"</span> <span class="hljs-attr">potentialActions</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">target:</span> '<span class="hljs-attr">https:</span>//<span class="hljs-attr">query.example.com</span>/<span class="hljs-attr">search</span>?<span class="hljs-attr">q</span>', <span class="hljs-attr">queryInput:</span> '<span class="hljs-attr">search_term_string</span>', }, { <span class="hljs-attr">target:</span> '<span class="hljs-attr">android-app:</span>//<span class="hljs-attr">com.example</span>/<span class="hljs-attr">https</span>/<span class="hljs-attr">query.example.com</span>/<span class="hljs-attr">search</span>/?<span class="hljs-attr">q</span>', <span class="hljs-attr">queryInput:</span> '<span class="hljs-attr">search_term_string</span>', }, ]} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>url</code></td> <td>URL of the website associated with the sitelinks searchbox</td> </tr> <tr> <td><code>potentialActions</code></td> <td>Array of one or two SearchAction objects. Describes the URI to send the query to, and the syntax of the request that is sent</td> </tr> <tr> <td><code>potentialActions.target</code></td> <td>For websites, the URL of the handler that should receive and handle the search query; for apps, the URI of the intent handler for your search engine that should handle queries</td> </tr> <tr> <td><code>potentialActions.queryInput</code></td> <td>Placeholder used in target, gets substituted for user given query</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <p>Read the <a href="https://developers.google.com/search/docs/appearance/structured-data/sitelinks-searchbox">documentation</a></p> <h3>Course</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">CourseJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Course JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">CourseJsonLd</span> <span class="hljs-attr">courseName</span>=<span class="hljs-string">"Course Name"</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"Introductory CS course laying out the basics."</span> <span class="hljs-attr">provider</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">name:</span> '<span class="hljs-attr">Course</span> <span class="hljs-attr">Provider</span>', <span class="hljs-attr">url:</span> '<span class="hljs-attr">https</span>//<span class="hljs-attr">www.example.com</span>/<span class="hljs-attr">provider</span>', }} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>courseName</code></td> <td>The title of the course.</td> </tr> <tr> <td><code>description</code></td> <td>A description of the course. Display limit of 60 characters.</td> </tr> <tr> <td><code>provider.name</code></td> <td>The course provider name.</td> </tr> <tr> <td><code>provider.url</code></td> <td>The course provider name url.</td> </tr> </tbody></table> <p><strong>Recommended properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>providerUrl</code></td> <td>The url to the course provider.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>Dataset</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">DatasetJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Dataset JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">DatasetJsonLd</span> <span class="hljs-attr">description</span>=<span class="hljs-string">"The description needs to be at least 50 characters long"</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"name of the dataset"</span> <span class="hljs-attr">license</span>=<span class="hljs-string">"https//www.example.com"</span> /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>description</code></td> <td>A short summary describing a dataset. Needs to be between 50 and 5000 characters.</td> </tr> <tr> <td><code>name</code></td> <td>A license under which the dataset is distributed.</td> </tr> </tbody></table> <p><strong>Recommended properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>license</code></td> <td>The url to the course provider.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>Corporate Contact</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">CorporateContactJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>Corporate Contact JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">CorporateContactJsonLd</span> <span class="hljs-attr">url</span>=<span class="hljs-string">"http://www.your-company-site.com"</span> <span class="hljs-attr">logo</span>=<span class="hljs-string">"http://www.example.com/logo.png"</span> <span class="hljs-attr">contactPoint</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">telephone:</span> '+<span class="hljs-attr">1-401-555-1212</span>', <span class="hljs-attr">contactType:</span> '<span class="hljs-attr">customer</span> <span class="hljs-attr">service</span>', <span class="hljs-attr">email:</span> '<span class="hljs-attr">customerservice</span>@<span class="hljs-attr">email.com</span>', <span class="hljs-attr">areaServed:</span> '<span class="hljs-attr">US</span>', <span class="hljs-attr">availableLanguage:</span> ['<span class="hljs-attr">English</span>', '<span class="hljs-attr">Spanish</span>', '<span class="hljs-attr">French</span>'], }, { <span class="hljs-attr">telephone:</span> '+<span class="hljs-attr">1-877-746-0909</span>', <span class="hljs-attr">contactType:</span> '<span class="hljs-attr">customer</span> <span class="hljs-attr">service</span>', <span class="hljs-attr">email:</span> '<span class="hljs-attr">servicecustomer</span>@<span class="hljs-attr">email.com</span>', <span class="hljs-attr">contactOption:</span> '<span class="hljs-attr">TollFree</span>', <span class="hljs-attr">availableLanguage:</span> '<span class="hljs-attr">English</span>', }, { <span class="hljs-attr">telephone:</span> '+<span class="hljs-attr">1-877-453-1304</span>', <span class="hljs-attr">contactType:</span> '<span class="hljs-attr">technical</span> <span class="hljs-attr">support</span>', <span class="hljs-attr">contactOption:</span> '<span class="hljs-attr">TollFree</span>', <span class="hljs-attr">areaServed:</span> ['<span class="hljs-attr">US</span>', '<span class="hljs-attr">CA</span>'], <span class="hljs-attr">availableLanguage:</span> ['<span class="hljs-attr">English</span>', '<span class="hljs-attr">French</span>'], }, ]} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>url</code></td> <td>Url to the home page of the company's official site.</td> </tr> <tr> <td><code>contactPoint</code></td> <td></td> </tr> <tr> <td><code>contactPoint.telephone</code></td> <td>An internationalized version of the phone number, starting with the "+" symbol and country code</td> </tr> <tr> <td><code>contactPoint.contactType</code></td> <td>Description of the purpose of the phone number i.e. <code>Technical Support</code>.</td> </tr> </tbody></table> <p><strong>Recommended ContactPoint properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>contactPoint.areaServed</code></td> <td><code>String</code> or <code>Array</code> of geographical regions served by the business. Example <code>"US"</code> or <code>["US", "CA", "MX"]</code></td> </tr> <tr> <td><code>contactPoint.availableLanguage</code></td> <td>Details about the language spoken. Example <code>"English"</code> or <code>["English", "French"]</code></td> </tr> <tr> <td><code>contactPoint.email</code></td> <td>Email asscosiated with the business`</td> </tr> <tr> <td><code>gecontactPointo.contactOption</code></td> <td>Details about the phone number. Example <code>"TollFree"</code></td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>FAQ Page</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">FAQPageJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <span class="language-xml"><span class="hljs-tag"><></span> <span class="hljs-tag"><<span class="hljs-name">h1</span>></span>FAQ Page JSON-LD<span class="hljs-tag"></<span class="hljs-name">h1</span>></span> <span class="hljs-tag"><<span class="hljs-name">FAQPageJsonLd</span> <span class="hljs-attr">mainEntity</span>=<span class="hljs-string">{[</span> { <span class="hljs-attr">questionName:</span> '<span class="hljs-attr">How</span> <span class="hljs-attr">long</span> <span class="hljs-attr">is</span> <span class="hljs-attr">the</span> <span class="hljs-attr">delivery</span> <span class="hljs-attr">time</span>?', <span class="hljs-attr">acceptedAnswerText:</span> '<span class="hljs-attr">3-5</span> <span class="hljs-attr">business</span> <span class="hljs-attr">days.</span>', }, { <span class="hljs-attr">questionName:</span> '<span class="hljs-attr">Where</span> <span class="hljs-attr">can</span> <span class="hljs-attr">I</span> <span class="hljs-attr">find</span> <span class="hljs-attr">information</span> <span class="hljs-attr">about</span> <span class="hljs-attr">product</span> <span class="hljs-attr">recalls</span>?', <span class="hljs-attr">acceptedAnswerText:</span> '<span class="hljs-attr">Read</span> <span class="hljs-attr">more</span> <span class="hljs-attr">on</span> <span class="hljs-attr">under</span> <span class="hljs-attr">information.</span>', }, ]} /></span> <span class="hljs-tag"></></span></span> ); <span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-title class_">Page</span>; </code></pre><p><strong>Required properties</strong></p> <table> <thead> <tr> <th>Property</th> <th>Info</th> </tr> </thead> <tbody><tr> <td><code>mainEntity</code></td> <td></td> </tr> <tr> <td><code>mainEntity.questionName</code></td> <td>The full text of the question. For example, "How long is the delivery time?".</td> </tr> <tr> <td><code>mainEntity.acceptedAnswerText</code></td> <td>The full answer to the question.</td> </tr> </tbody></table> <p><strong>Other</strong> | <code>useAppDir</code> | This should be set to true if using the new app directory. Not required if outside of the app directory. |</p> <h3>How-to</h3> <pre><code class="hljs language-jsx"><span class="hljs-keyword">import</span> { <span class="hljs-title class_">HowToJsonLd</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">'next-seo'</span>; <span class="hljs-keyword">const</span> <span class="hljs-title function_">Page</span> = (<span class="hljs-params"></span>) => ( <> <h1>How-to JSON-LD</h1> <HowToJsonLd name="How to tile a kitchen backsplash" image="https://example.com/photos/1x1/photo.jpg" estimatedCost={{ currency: 'USD', value: '100' }} supply={['tiles', 'thin-set', 'mortar', 'tile grout', 'grout sealer']} tool={['notched trowel', 'bucket', 'large sponge']} step={[ { url: 'https://example.com/kitchen#step1', name: 'Prepare the surfaces', itemListElement: [ { type: 'HowToTip', text: 'Turn off the power to the kitchen and then remove everything that is on the wall, such as outlet covers, switchplates, and any other item in the area that is to be tiled.', }, { type: 'HowToDirection', text: 'Then clean the surface thoroughly to remove any grease or other debris and tape off the area.', }, ], image: 'https://example.com/photos/1x1/p </code></pre></div> </div> <div class="mt-3 rounded-2xl bg-surface pb-2 pl-4 pr-4 md:mt-0 md:w-1/4"> <div class="pt-5"> <div class="overflow-x-auto whitespace-nowrap rounded-lg border bg-background p-2 pl-5 pr-5 text-center font-code text-lg"> npm i next-seo </div> </div> <div> <h2>Source Code</h2> <a href="https://github.com/garmeeh/next-seo.git" class="overflow-x-auto whitespace-nowrap rounded-lg bg-background p-2 text-white no-underline"> <span class="pl-2 pr-2"> github.com/garmeeh/next-seo.... </span> </a> <h2>Homepage</h2> <a href="https://github.com/garmeeh/next-seo#readme" class="rounded-lg bg-background p-2 text-white no-underline"> <span class="pl-2 pr-2"> github.com/garmeeh/next-seo#... </span> </a> </div> <div> <h2>Metadata</h2> <ul class="space-y-2 pl-2"> <li class="flex items-center space-x-2"> <svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" style="--darkreader-inline-stroke: currentColor;" class="h-6 w-6" data-darkreader-inline-stroke=""><path stroke="none" d="M0 0h24v24H0z" fill="none" style="--darkreader-inline-stroke: none;" data-darkreader-inline-stroke=""></path><path d="M15 21h-9a3 3 0 0 1 -3 -3v-1h10v2a2 2 0 0 0 4 0v-14a2 2 0 1 1 2 2h-2m2 -4h-11a3 3 0 0 0 -3 3v11"></path><path d="M9 7l4 0"></path><path d="M9 11l4 0"></path></svg> <a href="https://directory.fsf.org/wiki/License:MIT" class="text-white no-underline"> <span class="rounded-lg bg-background p-1 pl-2 pr-2"> MIT </span> </a> </li> <li class="flex items-center space-x-2"> <svg class="h-6 w-6" stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" style="--darkreader-inline-stroke: currentColor;" data-darkreader-inline-stroke=""><path stroke="none" d="M0 0h24v24H0z" fill="none" style="--darkreader-inline-stroke: none;" data-darkreader-inline-stroke=""></path><path d="M9 9v8.044a2 2 0 0 1 -2.996 1.734l-1.568 -.9a3 3 0 0 1 -1.436 -2.561v-6.635a3 3 0 0 1 1.436 -2.56l6 -3.667a3 3 0 0 1 3.128 0l6 3.667a3 3 0 0 1 1.436 2.561v6.634a3 3 0 0 1 -1.436 2.56l-6 3.667a3 3 0 0 1 -3.128 0"></path><path d="M17 9h-3.5a1.5 1.5 0 0 0 0 3h2a1.5 1.5 0 0 1 0 3h-3.5"></path></svg> <span class="rounded-lg bg-background p-1 pl-2 pr-2"> Whatever </span> </li> <li class="flex items-center space-x-2"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 448 512" class="h-6 w-6" xmlns="http://www.w3.org/2000/svg"><path d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"></path></svg> <span class="rounded-lg bg-background p-1 pl-2 pr-2"> Gary Meehan </span> </li> <li class="flex items-center space-x-2"> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 20 20" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" class="h-6 w-6"><path fill-rule="evenodd" d="M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM6.293 6.707a1 1 0 010-1.414l3-3a1 1 0 011.414 0l3 3a1 1 0 01-1.414 1.414L11 5.414V13a1 1 0 11-2 0V5.414L7.707 6.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg> <span class="rounded-lg bg-background p-1 pl-2 pr-2"> released 9/1/2024 </span> </li> </ul> </div> <div> <h2>Downloads</h2> <style>astro-island,astro-slot,astro-static-slot{display:contents}</style><script>(()=>{var e=async t=>{await(await t())()};(self.Astro||(self.Astro={})).only=e;window.dispatchEvent(new Event("astro:only"));})();;(()=>{var b=Object.defineProperty;var f=(c,o,i)=>o in c?b(c,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[o]=i;var l=(c,o,i)=>(f(c,typeof o!="symbol"?o+"":o,i),i);var p;{let c={0:t=>m(t),1:t=>i(t),2:t=>new RegExp(t),3:t=>new Date(t),4:t=>new Map(i(t)),5:t=>new Set(i(t)),6:t=>BigInt(t),7:t=>new URL(t),8:t=>new Uint8Array(t),9:t=>new Uint16Array(t),10:t=>new Uint32Array(t)},o=t=>{let[e,r]=t;return e in c?c[e](r):void 0},i=t=>t.map(o),m=t=>typeof t!="object"||t===null?t:Object.fromEntries(Object.entries(t).map(([e,r])=>[e,o(r)]));customElements.get("astro-island")||customElements.define("astro-island",(p=class extends HTMLElement{constructor(){super(...arguments);l(this,"Component");l(this,"hydrator");l(this,"hydrate",async()=>{var d;if(!this.hydrator||!this.isConnected)return;let e=(d=this.parentElement)==null?void 0:d.closest("astro-island[ssr]");if(e){e.addEventListener("astro:hydrate",this.hydrate,{once:!0});return}let r=this.querySelectorAll("astro-slot"),a={},h=this.querySelectorAll("template[data-astro-template]");for(let n of h){let s=n.closest(this.tagName);s!=null&&s.isSameNode(this)&&(a[n.getAttribute("data-astro-template")||"default"]=n.innerHTML,n.remove())}for(let n of r){let s=n.closest(this.tagName);s!=null&&s.isSameNode(this)&&(a[n.getAttribute("name")||"default"]=n.innerHTML)}let u;try{u=this.hasAttribute("props")?m(JSON.parse(this.getAttribute("props"))):{}}catch(n){let s=this.getAttribute("component-url")||"<unknown>",y=this.getAttribute("component-export");throw y&&(s+=` (export ${y})`),console.error(`[hydrate] Error parsing props for component ${s}`,this.getAttribute("props"),n),n}await this.hydrator(this)(this.Component,u,a,{client:this.getAttribute("client")}),this.removeAttribute("ssr"),this.dispatchEvent(new CustomEvent("astro:hydrate"))});l(this,"unmount",()=>{this.isConnected||this.dispatchEvent(new CustomEvent("astro:unmount"))})}disconnectedCallback(){document.removeEventListener("astro:after-swap",this.unmount),document.addEventListener("astro:after-swap",this.unmount,{once:!0})}connectedCallback(){if(!this.hasAttribute("await-children")||document.readyState==="interactive"||document.readyState==="complete")this.childrenConnectedCallback();else{let e=()=>{document.removeEventListener("DOMContentLoaded",e),r.disconnect(),this.childrenConnectedCallback()},r=new MutationObserver(()=>{var a;((a=this.lastChild)==null?void 0:a.nodeType)===Node.COMMENT_NODE&&this.lastChild.nodeValue==="astro:end"&&(this.lastChild.remove(),e())});r.observe(this,{childList:!0}),document.addEventListener("DOMContentLoaded",e)}}async childrenConnectedCallback(){let e=this.getAttribute("before-hydration-url");e&&await import(e),this.start()}start(){let e=JSON.parse(this.getAttribute("opts")),r=this.getAttribute("client");if(Astro[r]===void 0){window.addEventListener(`astro:${r}`,()=>this.start(),{once:!0});return}Astro[r](async()=>{let a=this.getAttribute("renderer-url"),[h,{default:u}]=await Promise.all([import(this.getAttribute("component-url")),a?import(a):()=>()=>{}]),d=this.getAttribute("component-export")||"default";if(!d.includes("."))this.Component=h[d];else{this.Component=h;for(let n of d.split("."))this.Component=this.Component[n]}return this.hydrator=u,this.hydrate},e,this)}attributeChangedCallback(){this.hydrate()}},l(p,"observedAttributes",["props"]),p))}})();</script><astro-island uid="Z21xLVo" component-url="/_astro/PackageDownloads.J8YmCCO0.js" component-export="default" renderer-url="/_astro/client.2wOxL1Aq.js" props="{"name":[0,"next-seo"]}" ssr="" client="only" opts="{"name":"PackageDownloads","value":true}"></astro-island> <noscript> <a href="/next-seo/downloads">Downloads Tab Here</a> </noscript> </div> <div> <h2>Maintainers</h2> <div> <a class="text-white no-underline" href="/~garymeehan"> <div class="mb-2 flex items-center space-x-2"> <img class="h-11 w-11 rounded-full" alt="@garymeehan" src="/~garymeehan/profile.png"> <span class="rounded-lg bg-background p-1 pl-2 pr-2"> garymeehan </span> <br> </div> </a> </div> </div> </div> </div> </div> </main> </div> </div> </body></html>