* #4252 Use vercel og to generate og images for meetings and apps. * Removed duplication. * Added new design for og images (wip). * Implemented og image design for meeting image, including support for all variants. * Implemented design for app og images. * clenaup * Fixed types * Added the option to not render headseo in main shell in order to render your own. * Added comments. * fix * Small tweaks. * Fixed lock file. * Fixed types * Optimized svg's so vercel og supports them. * Fixed og image on user page. * Added truncate utils. * Small style tweaks * App og image alignment. * Added og image to team/slug pages. * Added correct variable to og image path constant.
42 lines
899 B
TypeScript
42 lines
899 B
TypeScript
import { DefaultSeoProps, NextSeoProps } from "next-seo";
|
|
|
|
import { SEO_IMG_DEFAULT, SEO_IMG_OGIMG } from "@calcom/lib/constants";
|
|
|
|
import { AppImageProps, MeetingImageProps } from "./OgImages";
|
|
|
|
export type HeadSeoProps = {
|
|
title: string;
|
|
description: string;
|
|
siteName?: string;
|
|
url?: string;
|
|
canonical?: string;
|
|
nextSeoProps?: NextSeoProps;
|
|
app?: AppImageProps;
|
|
meeting?: MeetingImageProps;
|
|
};
|
|
|
|
const seoImages = {
|
|
default: SEO_IMG_DEFAULT,
|
|
ogImage: SEO_IMG_OGIMG,
|
|
};
|
|
|
|
export const getSeoImage = (key: keyof typeof seoImages): string => {
|
|
return seoImages[key];
|
|
};
|
|
|
|
export const seoConfig: {
|
|
headSeo: Required<Pick<HeadSeoProps, "siteName">>;
|
|
defaultNextSeo: DefaultSeoProps;
|
|
} = {
|
|
headSeo: {
|
|
siteName: "Cal.com",
|
|
},
|
|
defaultNextSeo: {
|
|
twitter: {
|
|
handle: "@calcom",
|
|
site: "@calcom",
|
|
cardType: "summary_large_image",
|
|
},
|
|
},
|
|
} as const;
|