Skip to content

virtuals/lib/head

type HeadConfig = z.output<ReturnType<typeof HeadConfigSchema>>;

Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:18^


type HeadUserConfig = z.input<ReturnType<typeof HeadConfigSchema>>;

Defined in: studiocms/packages/studiocms/src/virtuals/lib/head.ts:17^

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.

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"; }[][]

{ attrs: Record<string, undefined | string | boolean>; content: string; tag: | "base" | "title" | "meta" | "link" | "style" | "script" | "noscript" | "template"; }[]


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^

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">>