Skip to content

Commit 279264b

Browse files
committed
Fix og:url (this should work out of the box later)
1 parent cef7fd8 commit 279264b

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
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: 3 additions & 2 deletions
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
@@ -31,7 +32,7 @@ export const metadata = {
3132
images: [
3233
new URL('./opengraph-image.png', import.meta.url)
3334
.toString()
34-
// eslint-disable-next-line no-process-env
35+
3536
.replace(process.env.NEXT_BASE_PATH || '', ''),
3637
],
3738
},

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

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

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-
// eslint-disable-next-line no-process-env
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-
// eslint-disable-next-line no-process-env
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)