CommonHead.js (969B)
1 import Head from "next/head"; 2 3 import { site } from "../config.js"; 4 5 function CommonHead({ cover }) { 6 if (!cover) cover = site.cover; 7 return ( 8 <Head> 9 <meta charSet="utf-8" key="charset" /> 10 <meta 11 httpEquiv="x-ua-compatible" 12 content="ie=edge" 13 key="x-ua-compatible" 14 /> 15 <meta 16 name="viewport" 17 content="width=device-width, initial-scale=1, shrink-to-fit=no" 18 key="viewport" 19 /> 20 <meta name="description" content={site.description} key="description" /> 21 <meta 22 name="twitter:description" 23 content={site.description} 24 key="twitterdescription" 25 /> 26 <meta property="og:site_name" content={site.name} key="site_name" /> 27 <meta property="og:type" content="website" key="type" /> 28 <meta property="og:image" content={cover} key="image" /> 29 <meta property="og:url" content={site.url} key="url" /> 30 </Head> 31 ); 32 } 33 34 export default CommonHead;