mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 04:22:07 +00:00
* Add API for frameworks and examples * Adjust headers * Update frameworks list * Always use latest * Add types * Use now repo for downloading and listing * Use .existsSync * Remove unused packages * Use 307 for redirect * Add examples * Update tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Make examples unique * Remove detectors from frameworks API * Use /api instead of Next.js * Install dependencies * Rename project * Change name * Empty * Change name * Update api/tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Update examples Co-authored-by: Steven <steven@ceriously.com>
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import React from 'react';
|
|
import NextHead from 'next/head';
|
|
import { string } from 'prop-types';
|
|
|
|
const defaultDescription = '';
|
|
const defaultOGURL = '';
|
|
const defaultOGImage = '';
|
|
|
|
const Head = props => (
|
|
<NextHead>
|
|
<meta charSet="UTF-8" />
|
|
<title>{props.title || ''}</title>
|
|
<meta
|
|
name="description"
|
|
content={props.description || defaultDescription}
|
|
/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/favicon.ico" />
|
|
<meta property="og:url" content={props.url || defaultOGURL} />
|
|
<meta property="og:title" content={props.title || ''} />
|
|
<meta
|
|
property="og:description"
|
|
content={props.description || defaultDescription}
|
|
/>
|
|
<meta name="twitter:site" content={props.url || defaultOGURL} />
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
<meta name="twitter:image" content={props.ogImage || defaultOGImage} />
|
|
<meta property="og:image" content={props.ogImage || defaultOGImage} />
|
|
<meta property="og:image:width" content="1200" />
|
|
<meta property="og:image:height" content="630" />
|
|
</NextHead>
|
|
);
|
|
|
|
Head.propTypes = {
|
|
title: string,
|
|
description: string,
|
|
url: string,
|
|
ogImage: string,
|
|
};
|
|
|
|
export default Head;
|