1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 13:25:32 -04:00

extract metadata merging logic from each page into a helper function

This commit is contained in:
2025-03-14 20:16:27 -04:00
parent 6e572a8f48
commit 5ca7e6cb22
19 changed files with 211 additions and 245 deletions

View File

@@ -4,27 +4,21 @@ import { GitForkIcon, StarIcon } from "lucide-react";
import PageTitle from "../../components/PageTitle";
import Link from "../../components/Link";
import RelativeTime from "../../components/RelativeTime";
import { metadata as defaultMetadata } from "../layout";
import { addMetadata } from "../../lib/helpers/metadata";
import * as config from "../../lib/config";
import type { Metadata } from "next";
import type { User, Repository } from "@octokit/graphql-schema";
import styles from "./page.module.css";
export const revalidate = 600; // 10 minutes
export const metadata: Metadata = {
export const metadata = addMetadata({
title: "Projects",
openGraph: {
...defaultMetadata.openGraph,
title: "Projects",
url: "/projects",
},
description: `Most-starred repositories by @${config.authorSocial?.github} on GitHub`,
alternates: {
...defaultMetadata.alternates,
canonical: "/projects",
},
};
});
type Project = {
name: string;