mirror of
https://github.com/XFox111/my-website.git
synced 2026-04-22 07:28:01 +03:00
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import Package from "@/../package.json";
|
|
import { Metadata } from "next";
|
|
import { unstable_noStore } from "next/cache";
|
|
import bio from "./bio";
|
|
import socials from "./socials";
|
|
|
|
export const canonicalName: URL = new URL(`https://${process.env.DOMAIN_NAME}`);
|
|
const baseTitle: string = "Eugene Fox - Software developer";
|
|
|
|
const gender: string = "male";
|
|
const keywords: string[] = ["Eugene Fox", "software developer", ".net", "react", "frontend developer", "backend developer", ".net developer", "react developer", "fullstack developer", "software engineer", "Michael Gordeev", "Mikhail Gordeev"];
|
|
|
|
export const getTitle = (pageTitle: string, customBase?: string): string =>
|
|
pageTitle + " - " + (customBase ?? baseTitle);
|
|
|
|
export async function generateMetadata(): Promise<Metadata>
|
|
{
|
|
unstable_noStore();
|
|
return {
|
|
title: baseTitle,
|
|
description: bio[0],
|
|
metadataBase: canonicalName,
|
|
openGraph:
|
|
{
|
|
title: baseTitle,
|
|
description: bio[0],
|
|
type: "profile",
|
|
firstName: Package.author.name.split(" ")[0],
|
|
lastName: Package.author.name.split(" ")[1],
|
|
gender,
|
|
siteName: canonicalName.hostname,
|
|
locale: "en_US"
|
|
},
|
|
twitter:
|
|
{
|
|
site: "@xfox111",
|
|
card: "summary_large_image"
|
|
},
|
|
alternates:
|
|
{
|
|
canonical: canonicalName.href
|
|
},
|
|
authors: [
|
|
{
|
|
name: Package.author.name,
|
|
url: socials["LinkedIn"].href
|
|
}
|
|
],
|
|
keywords
|
|
};
|
|
}
|