Skip to content

Commit

Permalink
Open graph titles updated
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Nov 12, 2024
1 parent 8bcc8e0 commit 4bd3e77
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/collections/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export async function generateMetadata({
const slug = params.slug; // TODO: this needs to support both a slug or a uuid. we will need to update this later to check if slug is a uuid and then get the slugified title of the collection
return {
title: `${slug} - NYPL Digital Collections`,
openGraph: {
title: `${slug} - NYPL Digital Collections`,
},
};
}

Expand Down
4 changes: 3 additions & 1 deletion app/collections/lane/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ type LaneProps = {
export async function generateMetadata({
params,
}: LaneProps): Promise<Metadata> {
const slug = params.slug;
const title = slugToString(params.slug);
return {
title: `${title} - NYPL Digital Collections`,
openGraph: {
title: `${title} - NYPL Digital Collections`,
},
};
}

Expand Down
3 changes: 3 additions & 0 deletions app/collections/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { mockCollectionCards } from "__tests__/__mocks__/data/mockCollectionCard

export const metadata: Metadata = {
title: "Collections - NYPL Digital Collections",
openGraph: {
title: "Collections - NYPL Digital Collections",
},
};

export default async function Collections() {
Expand Down
3 changes: 3 additions & 0 deletions app/divisions/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export async function generateMetadata({
const slug = slugToString(params.slug);
return {
title: `${slug} - NYPL Digital Collections`,
openGraph: {
title: `${slug} - NYPL Digital Collections`,
},
};
}

Expand Down
3 changes: 3 additions & 0 deletions app/divisions/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { redirect } from "next/navigation";

export const metadata: Metadata = {
title: "Divisions - NYPL Digital Collections",
openGraph: {
title: "Divisions - NYPL Digital Collections",
},
};

export default async function Divisions() {
Expand Down
3 changes: 3 additions & 0 deletions app/items/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export async function generateMetadata({
params.item = item;
return {
title: `${item.title} - NYPL Digital Collections`, //should be item title
openGraph: {
title: `${item.title} - NYPL Digital Collections`,
},
};
}

Expand Down

0 comments on commit 4bd3e77

Please sign in to comment.