Files
website/apps/docs/utils/metadata.ts
Mauricio Siu af1b2dbd7a refactor: standardize code formatting and improve readability
- Updated various files to ensure consistent code formatting, including adjusting indentation and spacing.
- Refactored components and utility functions for better readability and maintainability.
- Removed unnecessary newlines and ensured consistent use of single quotes for strings across the codebase.
2025-11-30 01:46:48 -06:00

31 lines
834 B
TypeScript

import type { Metadata } from "next";
export const baseUrl =
process.env.NODE_ENV === "development"
? "http://localhost:3000"
: "https://docs.dokploy.com";
export const url = (path: string): string => new URL(path, baseUrl).toString();
export function createMetadata(override: Metadata): Metadata {
return {
...override,
openGraph: {
title: override.title ?? undefined,
description: override.description ?? undefined,
url: "https://fumadocs.vercel.app",
images: "/og.png",
siteName: "Fumadocs",
...override.openGraph,
},
twitter: {
card: "summary_large_image",
creator: "@money_is_shark",
title: override.title ?? undefined,
description: override.description ?? undefined,
images: "/banner.png",
...override.twitter,
},
};
}