chetanverma16 / react-portfolio-template

Modern React Portfolio Template (FREE)
https://react-portfolio-template.netlify.com/
1.38k stars 595 forks source link

PR to add _document.js #118

Open kylepott opened 2 months ago

kylepott commented 2 months ago

I tried to open a PR for this, but recommend adding /pages/_document.js with the following content. The purpose is to assist with accessibility by adding lang= to the HTML tag and also add meta name and description to help with SEO.

import { Html, Head, Main, NextScript } from 'next/document';

export default function Document() {
  return (
    <Html lang="en">  {/*Update your language to assist with accessibility*/}
      <Head>
        <meta name="description" content="" /> {/*Fill in a description of meta data to help with SEO*/}
        <meta charSet="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="icon" href="/favicon.ico" />
        {/* Add any additional meta tags or links here */}
      </Head>
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  );
}