🌐 The ultimate React OpenGraph component
The ultimate React OpenGraph component.
url
/ secure_url
for images and videos.pnpm i react react-ogp
import React from 'react'
import { OGP } from 'react-ogp'
import Head from 'next/head'
export default function Index() {
return (
<>
<Head>
<OGP
url="https://example.com"
title="My website"
description="This is my website"
siteName="example.com"
image="http://example.com/cover.jpg"
/>
</Head>
</>
)
}
import React from 'react'
import { OGP } from 'react-ogp'
import { Helmet as Head } from 'react-helmet'
export default function Index() {
return (
<>
<Head>
<OGP
url="https://example.com"
title="My website"
description="This is my website"
siteName="example.com"
image="http://example.com/cover.jpg"
/>
</Head>
</>
)
}