import type * as DateFnsLocales from 'date-fns/locale'; export type LocaleName = keyof typeof DateFnsLocales; export interface TagsProperty { type: 'tags'; key: K; title: string; omitEmpty?: boolean; } export interface PlainProperty { type: 'plain'; key: K; title: string; omitEmpty?: boolean; } export interface DatetimeProperty { type: 'datetime'; key: K; title: string; formatAsFrom?: boolean; dateFnsLocaleName?: LocaleName; format?: string; omitEmpty?: boolean; } export interface ProgressProperty { type: 'progress'; key: K; title: string; omitEmpty?: boolean; } export interface LinkProperty { type: 'link'; key: K; title: string; omitEmpty?: boolean; } export interface DynamicProperty { type: 'dynamic'; key: K | string; title: string; options: DynamicWordsCountProperty | DynamicReadingTimeProperty; } export interface DynamicWordsCountProperty { type: 'wordsCount'; } export interface DynamicReadingTimeProperty { type: 'readingTime'; dateFnsLocaleName?: LocaleName; } export type Property = TagsProperty | PlainProperty | DatetimeProperty | ProgressProperty | LinkProperty | DynamicProperty; export type PropertyType = Property['type']; export type DynamicPropertyType = DynamicProperty['options']['type']; export interface Locale extends Record { pageProperties?: { wordsCount?: string; }; } export interface Options

{ /** * Internationalization configuration * * When configuring, please configure according to the language code configured in * VitePress internationalization configuration. In the following configuration, 'en' * and 'zh-CN' are the language codes configured in VitePress internationalization * configuration. * * @default undefined * @example * ```ts * { * locales: { * 'en': { * ... * }, * 'zh-CN': { * ... * }, * } * } * ``` */ locales?: Record; properties?: Record[]>; }