extract metadata merging logic from each page into a helper function

This commit is contained in:
jake committed 2025-03-14 20:16:27 -04:00
1 parent 6e572a8f48
commit 5ca7e6cb22
19 files changed
+211 -245

No files matched your search

+4 -10
View File
@@ -1,22 +1,16 @@
import PageTitle from "../../components/PageTitle";
import Link from "../../components/Link";
import ContactForm from "./form";
import { metadata as defaultMetadata } from "../layout";
import type { Metadata, Route } from "next";
import { addMetadata } from "../../lib/helpers/metadata";
import type { Route } from "next";
export const metadata: Metadata = {
export const metadata = addMetadata({
title: "Contact Me",
description: "Fill out this quick form and I'll get back to you as soon as I can.",
openGraph: {
...defaultMetadata.openGraph,
title: "Contact Me",
url: "/contact",
},
alternates: {
...defaultMetadata.alternates,
canonical: "/contact",
},
};
});
const Page = () => {
return (