Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use metadatabase instead of manually passing the siteBaseUrl to OG and Twitter images #9228

Merged
merged 4 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/app/(site)/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const metadata: Metadata = {
title: 'Keystone Blog',
description: 'Blog posts from the team maintaining Keystone.',
openGraph: {
images: `${siteBaseUrl}/assets/blog/the-keystone-blog-cover.png`
images: '/assets/blog/the-keystone-blog-cover.png'
}
}

Expand Down
5 changes: 3 additions & 2 deletions docs/app/(site)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const defaultDescription =
'Build faster and scale further with the programmable open source GraphQL API back-end for structured content projects.'

export const metadata: Metadata = {
metadataBase: new URL(siteBaseUrl),
title: defaultTitle,
description: defaultDescription,
icons: {
Expand All @@ -25,7 +26,7 @@ export const metadata: Metadata = {
locale: 'en',
images: [
{
url: `${siteBaseUrl}/og-image-landscape.png`,
url: '/og-image-landscape.png',
width: 761,
height: 410,
alt: defaultDescription,
Expand All @@ -38,7 +39,7 @@ export const metadata: Metadata = {
card: 'summary_large_image',
images: [
{
url: `${siteBaseUrl}/og-image-landscape.png`,
url: '/og-image-landscape.png',
width: 761,
height: 410,
alt: defaultTitle,
Expand Down