diff --git a/packages/twenty-website/src/app/contributors/[slug]/page.tsx b/packages/twenty-website/src/app/contributors/[slug]/page.tsx index 549333552abf..c944001cc322 100644 --- a/packages/twenty-website/src/app/contributors/[slug]/page.tsx +++ b/packages/twenty-website/src/app/contributors/[slug]/page.tsx @@ -19,7 +19,11 @@ export function generateMetadata({ params: { slug: string }; }): Metadata { return { - title: params.slug + ' | Contributors', + title: 'Twenty - ' + params.slug, + description: + 'Explore the impactful contributions of ' + + params.slug + + ' on the Twenty Github Repo. Discover their merged pull requests, ongoing work, and top ranking. Join and contribute to the #1 Open-Source CRM thriving community!', }; } diff --git a/packages/twenty-website/src/app/contributors/page.tsx b/packages/twenty-website/src/app/contributors/page.tsx index deb8803f4494..88ed9e36d782 100644 --- a/packages/twenty-website/src/app/contributors/page.tsx +++ b/packages/twenty-website/src/app/contributors/page.tsx @@ -7,6 +7,13 @@ import { ContentContainer } from '@/app/_components/oss-friends/ContentContainer import { findAll } from '@/database/database'; import { pullRequestModel, userModel } from '@/database/model'; +export const metadata = { + title: 'Twenty - Contributors', + description: + 'Discover the brilliant minds behind Twenty.com. Meet our contributors and explore how their expertise contributes to making Twenty the leading open-source CRM. Join our community today.', + icons: '/images/core/logo.svg', +}; + interface Contributor { id: string; avatarUrl: string; diff --git a/packages/twenty-website/src/app/oss-friends/page.tsx b/packages/twenty-website/src/app/oss-friends/page.tsx index ec8d930e9626..f01de4eec8a3 100644 --- a/packages/twenty-website/src/app/oss-friends/page.tsx +++ b/packages/twenty-website/src/app/oss-friends/page.tsx @@ -4,6 +4,13 @@ import { CardContainer } from '@/app/_components/oss-friends/CardContainer'; import { ContentContainer } from '@/app/_components/oss-friends/ContentContainer'; import { Header } from '@/app/_components/oss-friends/Header'; +export const metadata = { + title: 'Twenty - OSS friends', + description: + 'At Twenty, we are proud to be part of a global open-source movement. Here are some of our fellow open source friends.', + icons: '/images/core/logo.svg', +}; + export default async function OssFriends() { const ossList = await fetch('https://formbricks.com/api/oss-friends'); diff --git a/packages/twenty-website/src/app/releases/page.tsx b/packages/twenty-website/src/app/releases/page.tsx index 51eb7709a70f..a958a3c8b2f3 100644 --- a/packages/twenty-website/src/app/releases/page.tsx +++ b/packages/twenty-website/src/app/releases/page.tsx @@ -12,7 +12,8 @@ import { export const metadata: Metadata = { title: 'Twenty - Releases', - description: 'Latest releases of Twenty', + description: + 'Discover the newest features and improvements in Twenty, the #1 open-source CRM.', }; const Home = async () => { diff --git a/packages/twenty-website/src/app/user-guide/[slug]/page.tsx b/packages/twenty-website/src/app/user-guide/[slug]/page.tsx index b2ae85b983ac..6fc8dc79209b 100644 --- a/packages/twenty-website/src/app/user-guide/[slug]/page.tsx +++ b/packages/twenty-website/src/app/user-guide/[slug]/page.tsx @@ -1,5 +1,22 @@ +import { Metadata } from 'next'; + import UserGuideContent from '@/app/_components/user-guide/UserGuideContent'; -import { getPost } from '@/app/_server-utils/get-posts'; +import { fetchArticleFromSlug } from '@/shared-utils/fetchArticleFromSlug'; +import { formatSlug } from '@/shared-utils/formatSlug'; + +export async function generateMetadata({ + params, +}: { + params: { slug: string }; +}): Promise { + const formattedSlug = formatSlug(params.slug); + const basePath = '/src/content/user-guide'; + const mainPost = await fetchArticleFromSlug(params.slug, basePath); + return { + title: 'Twenty - ' + formattedSlug, + description: mainPost?.itemInfo?.info, + }; +} export default async function UserGuideSlug({ params, @@ -7,10 +24,6 @@ export default async function UserGuideSlug({ params: { slug: string }; }) { const basePath = '/src/content/user-guide'; - - const mainPost = await getPost( - params.slug && params.slug.length ? params.slug : 'home', - basePath, - ); + const mainPost = await fetchArticleFromSlug(params.slug, basePath); return mainPost && ; } diff --git a/packages/twenty-website/src/app/user-guide/page.tsx b/packages/twenty-website/src/app/user-guide/page.tsx index 8b28fc394fbd..d7d05ca69444 100644 --- a/packages/twenty-website/src/app/user-guide/page.tsx +++ b/packages/twenty-website/src/app/user-guide/page.tsx @@ -1,5 +1,12 @@ import UserGuideMain from '@/app/_components/user-guide/UserGuideMain'; +export const metadata = { + title: 'Twenty - User Guide', + description: + 'Discover how to use Twenty CRM effectively with our detailed user guide. Explore ways to customize features, manage tasks, integrate emails, and navigate the system with ease.', + icons: '/images/core/logo.svg', +}; + export default async function UserGuideHome() { return ; } diff --git a/packages/twenty-website/src/shared-utils/fetchArticleFromSlug.ts b/packages/twenty-website/src/shared-utils/fetchArticleFromSlug.ts new file mode 100644 index 000000000000..7c270c8d0869 --- /dev/null +++ b/packages/twenty-website/src/shared-utils/fetchArticleFromSlug.ts @@ -0,0 +1,6 @@ +import { getPost } from '@/app/_server-utils/get-posts'; + +export async function fetchArticleFromSlug(slug: string, basePath: string) { + const effectiveSlug = slug && slug.length > 0 ? slug : 'home'; + return await getPost(effectiveSlug, basePath); +} diff --git a/packages/twenty-website/src/shared-utils/formatSlug.ts b/packages/twenty-website/src/shared-utils/formatSlug.ts new file mode 100644 index 000000000000..aee82e8f93cb --- /dev/null +++ b/packages/twenty-website/src/shared-utils/formatSlug.ts @@ -0,0 +1,6 @@ +export function formatSlug(slug: string): string { + return slug + .split('-') + .map((word: string) => word?.charAt(0)?.toUpperCase?.() + word?.slice?.(1)) + .join(' '); +}