Typed content built from plain files.

Validate Markdown, MDX, and JSON against Zod 4 schemas, generate strict TypeScript modules, and ship Orama search and edge-safe readers without CMS lock-in.

Read quickstart
  • Node >= 24
  • Zod 4 schemas
  • Zero-Node edge reader
  • 6 compiled guides

Four deterministic stages from disk to edge.

From plain files on disk through validation, typed emission, and runtime consumption, every stage shares one Zod schema contract.

Stage 01 / content/*.{md,mdx,json}

Author plain files beside Zod 4 schemas

Write Markdown with YAML frontmatter, MDX with export const meta, or JSON files inside collection directories. Slugs and locales come from predictable filename conventions.

  • Zero lock-in: files stay readable in Git, Obsidian, or any editor
  • Schema definitions live in zole.config.ts or per-collection schema.ts
  • Supports singletons via defineSingle and mixed types via defineMultiTypeCollection
zole.config.ts
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 },
});
  • 01 Author Markdown, MDX, and JSON parsed with filename slug and locale inference.
  • 02 Validate Zod 4 field checks, cross-collection relation checks, and locale fallback checks.
  • 03 Compile Deterministic TypeScript outputs, split i18n bundles, and persisted search index.
  • 04 Consume Edge-safe readers and writers plus schema-guarded zole mcp agent tools.

Built for strict teams and automated workflows.

Every guide on this site is validated and indexed at build time by @zolekit/core itself.

Validation and relations

Check frontmatter, JSX meta exports, and cross-collection slugs before broken references reach production.

@zolekit/core

Zero-Node edge bundles

Stream or fetch validated content with locale fallback resolution and client or Worker Orama search.

@zolekit/core/reader + /search

Agent-safe authoring

Expose schema introspection, search, lint, and format-preserving updates to CLI scripts and MCP hosts.

zole mcp + cli

Define once. Validate and query everywhere.

Configure collections in zole.config.ts and read or search the generated artifacts from Node, Workers, or the browser.

zole.config.ts
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 },
});
worker.ts
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" });

Type a command, config option, or guide title.