mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
fix: og title
This commit is contained in:
parent
0629b9edad
commit
e4391179fb
2 changed files with 4 additions and 1 deletions
|
|
@ -8,9 +8,12 @@ export default function Head() {
|
|||
name="description"
|
||||
content="An open source application built using the new router, server components and everything new in Next.js 13."
|
||||
/>
|
||||
|
||||
<meta property="og:title" content="Taxonomy" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://tx.shadcn.com" />
|
||||
<meta property="og:image" content="https://tx.shadcn.com/og.jpg" />
|
||||
<meta property="twitter:title" content="Taxonomy" />
|
||||
<meta property="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content="https://tx.shadcn.com" />
|
||||
<meta property="twitter:image" content="https://tx.shadcn.com/og.jpg" />
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default function MdxHead({ params, og }: MdxHeadProps) {
|
|||
const url = process.env.NEXT_PUBLIC_APP_URL
|
||||
let ogUrl = new URL(`${url}/og.jpg`)
|
||||
|
||||
if (og.type) {
|
||||
if (og?.type) {
|
||||
ogUrl = new URL(`${url}/api/og`)
|
||||
ogUrl.searchParams.set("heading", og.heading || mdxDoc.title)
|
||||
ogUrl.searchParams.set("type", og.type)
|
||||
|
|
|
|||
Loading…
Reference in a new issue