Fix og:url (this should work out of the box later) (#6506)

This commit is contained in:
Piotr Monwid-Olechnowicz 2025-02-13 06:35:53 +01:00 committed by GitHub
parent 73abccf82c
commit bb03c01dfb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 12 deletions

View file

@ -23,7 +23,7 @@ export async function generateMetadata(
// TODO: Remove this when Components have a fix for OG Images with basePath
docsMetadata.openGraph = {
...rootMetadata.openGraph,
...rootMetadata!.openGraph,
...docsMetadata.openGraph,
};

View file

@ -19,7 +19,8 @@ export const metadata = {
description:
'Discover what GraphQL Federation is, how it unifies multiple APIs into a Supergraph, its core benefits, and the building blocks like subgraphs, schema composition and gateway.',
openGraph: {
...rootMetadata.openGraph,
...rootMetadata!.openGraph,
url: '/federation',
/**
* We currently have `metadataBase` which includes `basePath`,
* so the opengraph-image.png file convention results in a

View file

@ -21,14 +21,9 @@ export const metadata: Metadata = {
title: 'Hive Gateway',
description:
'Unify and accelerate your data graph with Hive Gateway, which seamlessly integrates with Apollo Federation.',
alternates: {
// to remove leading slash
canonical: '.',
},
openGraph: {
...rootMetadata.openGraph,
// to remove leading slash
url: '.',
url: '/gateway',
},
};

View file

@ -42,7 +42,6 @@ metadata.openGraph = {
images: [
new URL('./opengraph-image.png', import.meta.url)
.toString()
.replace(process.env.NEXT_BASE_PATH || '', ''),
],
};

View file

@ -18,7 +18,7 @@ export const metadata = {
description:
'Accelerate GraphQL Federation adoption with the Hive Partner Network. Access enterprise-grade tools and expertise to build scalable, unified APIs across distributed systems. Join our network of federation experts.',
openGraph: {
...rootMetadata.openGraph,
...rootMetadata!.openGraph,
/**
* We currently have `metadataBase` which includes `basePath`,
* so the opengraph-image.png file convention results in a
@ -30,7 +30,6 @@ export const metadata = {
images: [
new URL('./opengraph-image.png', import.meta.url)
.toString()
.replace(process.env.NEXT_BASE_PATH || '', ''),
],
},

View file

@ -5,7 +5,7 @@ import { ProductUpdateHeader } from './product-update-header';
export const metadata = {
// TODO: Remove this when Components have a fix for OG Images with basePath
openGraph: rootMetadata.openGraph,
openGraph: rootMetadata!.openGraph,
};
const Layout = ({ children }: { children: ReactNode }): ReactElement => {