@venuecms/sdk-next
Version:
This is a work in progress and is heavily in flux until we launch 1.0 in February.
63 lines (60 loc) • 1.68 kB
text/typescript
import { MediaItem, LocalizedContent, Site } from '@venuecms/sdk';
type Params = {
locale: string;
siteKey: string;
};
type LocalizedItem = {
image?: MediaItem;
localizedContent: Array<LocalizedContent>;
};
type Metadata = {
title: string;
siteName: string;
metaTitle: string;
metaDescription: string;
keywords: string;
content: string;
shortContent: string;
};
declare const getLocalizedMetadata: ({ locale, item, site, overrides, }: {
locale: string;
item?: LocalizedItem;
site: Site;
overrides?: Partial<Metadata>;
}) => {
title: string;
siteName?: string | undefined;
metaTitle?: string | undefined;
metaDescription?: string | undefined;
keywords: string | string[] | undefined;
content?: string | undefined;
shortContent?: string | undefined;
description: string | undefined;
openGraph: {
title: string | null | undefined;
siteName: string | null | undefined;
metaTitle?: string | undefined;
metaDescription?: string | undefined;
keywords?: string | undefined;
content?: string | undefined;
shortContent?: string | undefined;
locale: string;
type: string;
images: {
width: unknown;
height: unknown;
url: string | null | undefined;
}[];
description: string | undefined;
};
};
declare const getGenerateMetadata: (getItem: (params: {
slug: string;
}) => Promise<{
data: any;
}>) => ({ params }: {
params: Promise<Params & {
slug: string;
}>;
}) => Promise<{}>;
export { getGenerateMetadata, getLocalizedMetadata };