Validation and relations
Check frontmatter, JSX meta exports, and cross-collection slugs before broken references reach production.
@zolekit/coreValidate Markdown, MDX, and JSON against Zod 4 schemas, generate strict TypeScript modules, and ship Orama search and edge-safe readers without CMS lock-in.
From plain files on disk through validation, typed emission, and runtime consumption, every stage shares one Zod schema contract.
import { defineCollection, defineConfig } from "@zolekit/core";
import { z } from "zod";
export const docs = defineCollection({
schema: z.object({
title: z.string().min(1),
order: z.number().int(),
}),
});
export default defineConfig({
collections: { docs: { path: "content/docs", schema: docs.meta } },
search: { enabled: true },
});
Every guide on this site is validated and indexed at build time by @zolekit/core itself.
Check frontmatter, JSX meta exports, and cross-collection slugs before broken references reach production.
@zolekit/coreStream or fetch validated content with locale fallback resolution and client or Worker Orama search.
@zolekit/core/reader + /searchExpose schema introspection, search, lint, and format-preserving updates to CLI scripts and MCP hosts.
zole mcp + cliBrowse every reference manual compiled from this repository's docs collection.
Install @zolekit/core and @zolekit/cli, configure zole.config.ts, and run your first typed build.
Project-level zole.config.ts options, filesystem discovery vs centralized collections, singles, i18n, and hooks.
How Zole maps Markdown, MDX, and JSON files into strongly typed collection entries, relations, and locale variants.
Reference for all 16 zole CLI commands, structured JSON flags, and agent-friendly authoring operations.
Using @zolekit/core/api, @zolekit/core/reader, @zolekit/core/writer, and @zolekit/core/search on edge runtimes.
Run zole mcp for agentic content authoring with read-only defaults and schema-verified mutations.
Configure collections in zole.config.ts and read or search the generated artifacts from Node, Workers, or the browser.
import { defineCollection, defineConfig } from "@zolekit/core";
import { z } from "zod";
const docs = defineCollection({
schema: z.object({
title: z.string().min(1),
section: z.enum(["Overview", "Reference", "Runtime"]),
order: z.number().int().min(1),
}),
});
export default defineConfig({
collections: {
docs: { path: "content/docs", schema: docs.meta },
},
outputDir: "generated/content",
strict: true,
search: { enabled: true },
});
import { createReader, fetchStorage } from "@zolekit/core/reader";
import { querySearchIndex, restoreIndexFromJson } from "@zolekit/core/search";
const reader = createReader(
{ collections: [{ name: "docs", dir: "content/docs" }] },
fetchStorage({ baseUrl: "https://zole.dev" })
);
const entry = await reader.collections.docs.read("quickstart");
const rawIndex = await fetch("https://zole.dev/search-index.json");
const index = await restoreIndexFromJson(await rawIndex.text());
const hits = await querySearchIndex(index, { query: "defineCollection" });