37 lines
864 B
TypeScript
37 lines
864 B
TypeScript
import type { Metadata } from "next";
|
|
|
|
const siteName = "Funktechnik Schubert";
|
|
const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3010";
|
|
const keywords = [
|
|
"Funktechnik Schubert",
|
|
"Funkgeräte Reparatur",
|
|
"CB Funk Service",
|
|
"Amateurfunk Reparatur",
|
|
"Funkgeräte Abgleich",
|
|
"Funktechnik Service",
|
|
"Kommunikationstechnik",
|
|
];
|
|
|
|
export function createMetadata(title: string, description: string, path = "/"): Metadata {
|
|
const url = new URL(path, siteUrl).toString();
|
|
const fullTitle = title === siteName ? title : `${title} | ${siteName}`;
|
|
|
|
return {
|
|
title: fullTitle,
|
|
description,
|
|
keywords,
|
|
alternates: {
|
|
canonical: url,
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
locale: "de_DE",
|
|
url,
|
|
siteName,
|
|
title: fullTitle,
|
|
description,
|
|
},
|
|
};
|
|
}
|
|
|
|
export { siteName, siteUrl };
|