virtuals/lib/head
此内容尚不支持你的语言。
Type Aliases
Section titled “Type Aliases”HeadConfig
Section titled “HeadConfig”type HeadConfig = z.output<ReturnType<typeof HeadConfigSchema>>;
Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:18^
HeadUserConfig
Section titled “HeadUserConfig”type HeadUserConfig = z.input<ReturnType<typeof HeadConfigSchema>>;
Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:17^
Functions
Section titled “Functions”createHead()
Section titled “createHead()”function createHead(defaults: | undefined | { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template"; }[], ...heads: { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template"; }[][]): { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template"; }[]
Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:23^
Create a fully parsed, merged, and sorted head entry array from multiple sources.
Parameters
Section titled “Parameters”defaults
Section titled “defaults”undefined
| {
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "base"
| "title"
| "meta"
| "link"
| "style"
| "script"
| "noscript"
| "template"
;
}[]
…{
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "base"
| "title"
| "meta"
| "link"
| "style"
| "script"
| "noscript"
| "template"
;
}[][]
Returns
Section titled “Returns”{
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "base"
| "title"
| "meta"
| "link"
| "style"
| "script"
| "noscript"
| "template"
;
}[]
HeadConfigSchema()
Section titled “HeadConfigSchema()”function HeadConfigSchema(): ZodDefault<ZodArray<ZodObject<{ attrs: ZodDefault<ZodRecord<ZodString, ZodUnion<[ZodString, ZodBoolean, ZodUndefined]>>>; content: ZodDefault<ZodString>; tag: ZodEnum<["title", "base", "link", "style", "meta", "script", "noscript", "template"]>; }, "strip", ZodTypeAny, { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template"; }, { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template";}>, "many">>
Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:3^
Returns
Section titled “Returns”ZodDefault
<ZodArray
<ZodObject
<{
attrs
: ZodDefault
<ZodRecord
<ZodString
, ZodUnion
<[ZodString
, ZodBoolean
, ZodUndefined
]>>>;
content
: ZodDefault
<ZodString
>;
tag
: ZodEnum
<["title"
, "base"
, "link"
, "style"
, "meta"
, "script"
, "noscript"
, "template"
]>;
}, "strip"
, ZodTypeAny
, {
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "base"
| "title"
| "meta"
| "link"
| "style"
| "script"
| "noscript"
| "template"
;
}, {
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "base"
| "title"
| "meta"
| "link"
| "style"
| "script"
| "noscript"
| "template"
;
}>, "many"
>>