Skip to content

Commit 6642f8b

Browse files
committed
Enhance metadata handling across contact, newsletter, and work pages
- Introduced a consistent metadata structure using the META constant and createMetadata utility for improved SEO and clarity. - Updated page titles and descriptions for the contact, newsletter, and work pages to better reflect their content and enhance user engagement. - Added Open Graph and Twitter metadata for better social media integration and sharing capabilities.
1 parent 95b5221 commit 6642f8b

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

src/app/(rest)/contact/page.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1+
import { META } from '~/lib/constants/metadata'
2+
import { createMetadata } from '~/lib/utils/create-metadata'
13
import { ContactForm } from './contact-form'
24

5+
const title = `Contact | ${META.title}`
6+
const description = `Get in touch to discuss AI product strategy, implementation, and collaboration. ${META.description}`
7+
8+
export const metadata = createMetadata({
9+
description,
10+
openGraph: {
11+
description,
12+
title
13+
},
14+
title,
15+
twitter: {
16+
description,
17+
title
18+
}
19+
})
20+
321
export default function Page() {
422
return (
523
<div className="flex min-h-screen max-w-full flex-col items-center justify-center gap-16 p-4 py-32">

src/app/(rest)/newsletter/page.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
import { NewsletterForm } from '~/app/(rest)/newsletter/newsletter-form'
2+
import { META } from '~/lib/constants/metadata'
3+
import { createMetadata } from '~/lib/utils/create-metadata'
24
import { getNewsletterMetadata } from '~/lib/utils/newsletters'
35
import { NewsletterList } from './newsletter-list'
46

7+
const title = `The Grid | ${META.title}`
8+
const description = `The Grid is a newsletter by Rubric Labs with three actionable insights on building, shipping, and scaling intelligent products. ${META.description}`
9+
10+
export const metadata = createMetadata({
11+
description,
12+
openGraph: {
13+
description,
14+
title
15+
},
16+
title,
17+
twitter: {
18+
description,
19+
title
20+
}
21+
})
22+
523
export default async function Page() {
624
const newsletters = await getNewsletterMetadata()
725

src/app/(rest)/work/page.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1+
import { META } from '~/lib/constants/metadata'
2+
import { createMetadata } from '~/lib/utils/create-metadata'
13
import { CTA } from '~/ui/cta'
24
import { WorkTable } from '~/ui/work-table'
35

6+
const title = `Work | ${META.title}`
7+
const description = `Client projects, case studies, and technical writing from the Rubric Labs team. ${META.description}`
8+
9+
export const metadata = createMetadata({
10+
description,
11+
openGraph: {
12+
description,
13+
title
14+
},
15+
title,
16+
twitter: {
17+
description,
18+
title
19+
}
20+
})
21+
422
export default function Page() {
523
return (
624
<div className="flex flex-col items-center p-4 py-32">

src/lib/constants/metadata.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ const META: AppMetadata = {
1616
description: 'Rubric is an applied AI lab helping companies build intelligent applications.',
1717
openGraph: {
1818
description: 'Rubric is an applied AI lab helping companies build intelligent applications.',
19+
images: [{ alt: 'Rubric Labs', url: '/opengraph-image' }],
1920
title: 'Rubric Labs'
2021
},
2122
title: 'Rubric Labs',
2223
twitter: {
2324
card: 'summary_large_image',
2425
creator: '@rubriclabs',
2526
description: 'Rubric is an applied AI lab helping companies build intelligent applications.',
27+
images: [{ alt: 'Rubric Labs', url: '/twitter-image' }],
2628
title: 'Rubric Labs'
2729
}
2830
}

0 commit comments

Comments
 (0)