Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 652 Bytes

meta-tags.md

File metadata and controls

34 lines (26 loc) · 652 Bytes

How to add meta tags

There are various ways how you can add and control meta tags. One of them is to use the https://www.npmjs.com/package/react-helmet package.

Install:

npm i react-helmet

Use:

import './App.css';
import { Helmet } from 'react-helmet';

function App() {
  return (
    <div>
      <Helmet>
        <title>Portfolio::Marvel Template</title>
        <meta charSet="utf-8" />
        <meta name="description" content="Description text" />
        <meta name="author" content="Author text" />
      </Helmet>
    </div>
  );
}

export default App;

References: