From 323e94ae7c48d38310a307b8dc74bcee8b9c6bab Mon Sep 17 00:00:00 2001 From: Kyle Gach Date: Wed, 4 Dec 2024 11:07:25 -0700 Subject: [PATCH] Update document title format --- apps/addon-catalog/app/(home)/tag/[...name]/page.tsx | 2 +- apps/addon-catalog/app/[...addonName]/page.tsx | 2 +- apps/addon-catalog/app/layout.tsx | 2 +- apps/frontpage/app/community/page.tsx | 7 +++++++ apps/frontpage/app/docs/[...slug]/page.tsx | 2 +- apps/frontpage/app/docs/page.tsx | 2 +- apps/frontpage/app/recipes/[...name]/page.tsx | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/apps/addon-catalog/app/(home)/tag/[...name]/page.tsx b/apps/addon-catalog/app/(home)/tag/[...name]/page.tsx index d97fdd10..1a73581d 100644 --- a/apps/addon-catalog/app/(home)/tag/[...name]/page.tsx +++ b/apps/addon-catalog/app/(home)/tag/[...name]/page.tsx @@ -34,7 +34,7 @@ export const generateMetadata: GenerateMetaData = async ({ params }) => { const { displayName } = data; return { - title: displayName ? `${displayName} integrations | Storybook` : undefined, + title: displayName ? `${displayName} tag | Storybook integrations` : undefined, }; }; diff --git a/apps/addon-catalog/app/[...addonName]/page.tsx b/apps/addon-catalog/app/[...addonName]/page.tsx index 648cb9d4..ebf22fab 100644 --- a/apps/addon-catalog/app/[...addonName]/page.tsx +++ b/apps/addon-catalog/app/[...addonName]/page.tsx @@ -37,7 +37,7 @@ export const generateMetadata: GenerateMetaData = async ({ params }) => { return { title: addon?.displayName - ? `${addon.displayName} integration | Storybook` + ? `${addon.displayName} | Storybook integrations` : undefined, }; }; diff --git a/apps/addon-catalog/app/layout.tsx b/apps/addon-catalog/app/layout.tsx index 532c8bcb..93ff5468 100644 --- a/apps/addon-catalog/app/layout.tsx +++ b/apps/addon-catalog/app/layout.tsx @@ -18,7 +18,7 @@ const fontSans = nunitoSans({ export const metadata: Metadata = { metadataBase: new URL('https://storybook.js.org/integrations'), - title: 'Integrations | Storybook', + title: 'Storybook integrations', description: 'Integrations enable advanced functionality and unlock new workflows. Contributed by core maintainers and the amazing developer community.', openGraph: { diff --git a/apps/frontpage/app/community/page.tsx b/apps/frontpage/app/community/page.tsx index 3f3179d5..423906f3 100644 --- a/apps/frontpage/app/community/page.tsx +++ b/apps/frontpage/app/community/page.tsx @@ -1,3 +1,4 @@ +import type { Metadata } from 'next'; import { Header, Footer, Container, NewsletterForm } from '@repo/ui'; import { fetchDiscordMembers, @@ -18,6 +19,12 @@ import { Sponsor } from '../../components/community/sponsor'; import { Testimonials } from '../../components/community/testimonials'; import { CommunityProvider } from './provider'; +export function generateMetadata(): Metadata { + return { + title: 'Community | Storybook', + }; +} + export default async function Page() { const { number: githubCount, formattedResult: githubCountFormatted } = await fetchGithubCount(); diff --git a/apps/frontpage/app/docs/[...slug]/page.tsx b/apps/frontpage/app/docs/[...slug]/page.tsx index 8221ee1c..daff163e 100644 --- a/apps/frontpage/app/docs/[...slug]/page.tsx +++ b/apps/frontpage/app/docs/[...slug]/page.tsx @@ -50,7 +50,7 @@ export const generateMetadata: GenerateMetaData = async ({ params }) => { ); return { - title: `${page?.title ?? 'Docs'} | Storybook`, + title: page?.title ? `${page.title} | Storybook docs` : undefined, alternates: { canonical: findPage?.canonical, }, diff --git a/apps/frontpage/app/docs/page.tsx b/apps/frontpage/app/docs/page.tsx index 13d402e9..4fe9d17d 100644 --- a/apps/frontpage/app/docs/page.tsx +++ b/apps/frontpage/app/docs/page.tsx @@ -9,7 +9,7 @@ export async function generateMetadata(): Promise { const page = await getPageData([latestVersion.id], latestVersion); return { - title: `${page?.title ?? 'Docs'} | Storybook`, + title: page?.title ? `${page.title} | Storybook docs` : undefined, alternates: { canonical: '/docs', }, diff --git a/apps/frontpage/app/recipes/[...name]/page.tsx b/apps/frontpage/app/recipes/[...name]/page.tsx index e894a8de..ef6f68ee 100644 --- a/apps/frontpage/app/recipes/[...name]/page.tsx +++ b/apps/frontpage/app/recipes/[...name]/page.tsx @@ -57,7 +57,7 @@ export const generateMetadata: GenerateMetaData = async ({ params }) => { return { title: recipe?.displayName - ? `${recipe.displayName} recipe | Storybook` + ? `${recipe.displayName} recipe | Storybook recipes` : undefined, }; };