/react-seo-expert

❤️ Google Love - ⚡️ React Seo Expert is a plugin for React projects with Next library. Text analysis and assessment library in JavaScript based on The Open Graph protocol.

Primary LanguageJavaScriptMIT LicenseMIT

React Seo Expert standard-readme compliant

React Seo Expert

React Seo Expert is a plugin for React.js projects with Next.js library.

Text analysis and assessment library in JavaScript based on The Open Graph protocol, Google Site Verification and Twitter Cards.

Without and With React Seo Expert

Without and With React Seo Expert

Installation

You can install React Seo Expert using npm:

npm install react-seo-expert

Usage

You can either use React Seo Expert using the web worker API or use the internal components directly.

Because a web worker must be a separate script in the browser you first need to create a script for inside the web worker:

import Head from 'next/head';
import React from 'react';
import Seo from 'react-seo-expert';

class Index extends React.Component {
  render() {
    const SEO = {
      "keywords": "",
      "author": "",
      "copyright": "",
      "email": "",
      "language": "",
      "robots": "",
      "google_site_verification": "",
      "viewport": "",
      "title": "",
      "description": "",
      "locale": "",
      "type": "",
      "image": "",
      "video": "",
      "audio": "",
      "url": "",
      "twitter_card": "",
      "twitter_site": "",
      "twitter_creator": ""
    }
    return (
      <div>
        <Head>
          <title>{SEO.title}</title>
        </Head>
        <Seo config={SEO} />
      </div>
    );
  }
}
export default Index;

More Info

The Open Graph protocol
Google Site Verification
Tweets with Cards

Maintainers

JoseJPR Avatar
@JoseJPR

License

MIT

Happy Code

Created with JavaScript, lot of ❤️ and a few 🍺