vercel-og-with-tweaks/pages/index.tsx

26 lines
765 B
TypeScript
Raw Normal View History

2022-11-04 23:02:31 +00:00
import Head from 'next/head'
export default function Page() {
return (
<div>
<Head>
<meta name="og:title" content="Vercel Edge Network" />
<meta name="og:description" content="Vercel Edge Network" />
<meta
name="og:image"
content={
// Because OG images must have a absolute URL, we use the
// `VERCEL_URL` environment variable to get the deployments URL.
// More info:
// https://vercel.com/docs/concepts/projects/environment-variables
`${
process.env.VERCEL_URL ? 'https://' + process.env.VERCEL_URL : ''
}/api/vercel`
}
/>
</Head>
<h1>A page with Open Graph Image.</h1>
</div>
)
}