Skip to content

Commit bb03c01

Browse files
authored
Fix og:url (this should work out of the box later) (#6506)
1 parent 73abccf commit bb03c01

File tree

6 files changed

+6
-12
lines changed

6 files changed

+6
-12
lines changed

packages/web/docs/src/app/docs/[[...mdxPath]]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export async function generateMetadata(
2323

2424
// TODO: Remove this when Components have a fix for OG Images with basePath
2525
docsMetadata.openGraph = {
26-
...rootMetadata.openGraph,
26+
...rootMetadata!.openGraph,
2727
...docsMetadata.openGraph,
2828
};
2929

packages/web/docs/src/app/federation/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const metadata = {
1919
description:
2020
'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.',
2121
openGraph: {
22-
...rootMetadata.openGraph,
22+
...rootMetadata!.openGraph,
23+
url: '/federation',
2324
/**
2425
* We currently have `metadataBase` which includes `basePath`,
2526
* so the opengraph-image.png file convention results in a

packages/web/docs/src/app/gateway/page.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@ export const metadata: Metadata = {
2121
title: 'Hive Gateway',
2222
description:
2323
'Unify and accelerate your data graph with Hive Gateway, which seamlessly integrates with Apollo Federation.',
24-
alternates: {
25-
// to remove leading slash
26-
canonical: '.',
27-
},
2824
openGraph: {
2925
...rootMetadata.openGraph,
30-
// to remove leading slash
31-
url: '.',
26+
url: '/gateway',
3227
},
3328
};
3429

packages/web/docs/src/app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ metadata.openGraph = {
4242
images: [
4343
new URL('./opengraph-image.png', import.meta.url)
4444
.toString()
45-
4645
.replace(process.env.NEXT_BASE_PATH || '', ''),
4746
],
4847
};

packages/web/docs/src/app/partners/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const metadata = {
1818
description:
1919
'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.',
2020
openGraph: {
21-
...rootMetadata.openGraph,
21+
...rootMetadata!.openGraph,
2222
/**
2323
* We currently have `metadataBase` which includes `basePath`,
2424
* so the opengraph-image.png file convention results in a
@@ -30,7 +30,6 @@ export const metadata = {
3030
images: [
3131
new URL('./opengraph-image.png', import.meta.url)
3232
.toString()
33-
3433
.replace(process.env.NEXT_BASE_PATH || '', ''),
3534
],
3635
},

packages/web/docs/src/app/product-updates/(posts)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ProductUpdateHeader } from './product-update-header';
55

66
export const metadata = {
77
// TODO: Remove this when Components have a fix for OG Images with basePath
8-
openGraph: rootMetadata.openGraph,
8+
openGraph: rootMetadata!.openGraph,
99
};
1010

1111
const Layout = ({ children }: { children: ReactNode }): ReactElement => {

0 commit comments

Comments
 (0)