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

26 lines
765 B
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
)
}