@barnabask/astro-minisearch
Version:
Utilities to add a static full text index to an Astro project
22 lines • 734 B
JavaScript
import { z } from "zod";
// from withastro/astro/packages/astro-rss/src/index.ts
const globResultValidator = z.record(z.function().returns(z.promise(z.any())));
/** Plugin options [Zod](https://zod.dev/) schema */
export const pluginOptionValidator = z.object({
/**
* Frontmatter property to store plain text output
* @default "plainText".
*/
contentKey: z.string().default("plainText"),
/**
* Strip emoji out of text
* @default true
*/
removeEmoji: z.boolean().default(true),
/**
* Tags to consider headings and make separate search documents.
* @default ["h2", "h3"]
*/
headingTags: z.array(z.string()).default(["h2", "h3"]),
});
//# sourceMappingURL=types.js.map