share.js
559 Bytes
import * as v from 'valibot'
/**
* 可分享对象的元数据:社交爬虫 / SEO 注入 og/title 与首屏最小内容所需的最小形状。
* 单一事实来源,供 `@drama/share` 的 `buildMetaTags` / `buildPreview` / `createMetaInjector` 消费。
* @typedef {{
* title: string,
* description: string,
* image: string,
* url: string,
* type?: string
* }} ShareMetaT
*/
export const ShareMeta = v.object({
title: v.string(),
description: v.string(),
image: v.string(),
url: v.string(),
type: v.optional(v.string()),
})