Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"ignore": ["example"],
"snapshot": {
"useCalculatedVersion": true
}
Expand Down
5 changes: 5 additions & 0 deletions .changeset/release-leadtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"leadtype": minor
---

Release leadtype
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ leadtype is **not a docs website framework**. Bring your own UI — Next.js, Tan

## Choose your path

- **[Build a docs site](https://docs.example.com/docs/build/connect-docs-site)** — wire leadtype into your build to convert MDX, index search, and serve markdown to agents.
- **[Bundle docs into your package](https://docs.example.com/docs/build/bundle-package-docs)** — ship `AGENTS.md` plus topic markdown inside the npm tarball so coding agents auto-discover them from `node_modules/<your-package>/AGENTS.md`.
- **[Build a docs site](https://leadtype.dev/docs/build/connect-docs-site)** — wire leadtype into your build to convert MDX, index search, and serve markdown to agents.
- **[Bundle docs into your package](https://leadtype.dev/docs/build/bundle-package-docs)** — ship `AGENTS.md` plus topic markdown inside the npm tarball so coding agents auto-discover them from `node_modules/<your-package>/AGENTS.md`.

## Install

Expand All @@ -41,7 +41,7 @@ pnpm add leadtype
For a hosted docs site:

```bash
npx leadtype generate --src . --out public --base-url https://docs.example.com
npx leadtype generate --src . --out public --base-url https://leadtype.dev
```

For an npm-bundled doc set:
Expand All @@ -54,13 +54,13 @@ The first produces `public/llms.txt`, `public/docs/llms-full/*.txt`, `public/doc

## Documentation

Full docs at [docs.example.com](https://docs.example.com/docs):
Full docs at [leadtype.dev](https://leadtype.dev/docs):

- [Quickstart](https://docs.example.com/docs/quickstart)
- [How it works](https://docs.example.com/docs/how-it-works)
- [Frontmatter](https://docs.example.com/docs/authoring/frontmatter)
- [CLI reference](https://docs.example.com/docs/reference/cli)
- [Methodology](https://docs.example.com/docs/methodology) — how leadtype differs from Fumadocs, Starlight, and Mintlify
- [Quickstart](https://leadtype.dev/docs/quickstart)
- [How it works](https://leadtype.dev/docs/how-it-works)
- [Frontmatter](https://leadtype.dev/docs/authoring/frontmatter)
- [CLI reference](https://leadtype.dev/docs/reference/cli)
- [Methodology](https://leadtype.dev/docs/methodology) — how leadtype differs from Fumadocs, Starlight, and Mintlify

## Repo layout

Expand Down
11 changes: 11 additions & 0 deletions apps/example/content/docs/guides/extracted-type-table-fixture.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Extracted type table fixture"
description: "Fixture used by the example pipeline test."
---

# Extracted type table fixture

<ExtractedTypeTable
name="PipelineExampleOptions"
path="./apps/example/type-fixtures/pipeline-example.ts"
/>
4 changes: 2 additions & 2 deletions apps/example/scripts/bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async function bench(): Promise<Stats[]> {
await generateLlmsTxt({
srcDir: SRC_DIR,
outDir: OUT_DIR,
baseUrl: "https://docs.example.com",
baseUrl: "https://leadtype.dev",
product: {
name: "Bench SDK",
summary: "Benchmark fixture.",
Expand All @@ -112,7 +112,7 @@ async function bench(): Promise<Stats[]> {
});
await generateLLMFullContextFiles({
outDir: OUT_DIR,
baseUrl: "https://docs.example.com",
baseUrl: "https://leadtype.dev",
product: { name: "Bench SDK" },
groups: BENCH_GROUPS,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/example/scripts/llm-generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const baseUrl =
process.env.LEADTYPE_AGENT_BASE_URL?.trim() ||
process.env.BASE_URL?.trim() ||
process.env.PORTLESS_URL?.trim() ||
"https://docs.example.com";
"https://leadtype.dev";

await generateLlmsTxt({
srcDir,
Expand Down
2 changes: 1 addition & 1 deletion apps/example/scripts/search-generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const generatedContentPath = join(generatedDir, "docs-search-content.json");

const result = await generateDocsSearchFiles({
outDir,
baseUrl: "https://docs.example.com",
baseUrl: "https://leadtype.dev",
});

await mkdir(generatedDir, { recursive: true });
Expand Down
82 changes: 41 additions & 41 deletions apps/example/src/generated/agent-readability.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"generatedAt": "2026-05-10T05:57:49.145Z",
"baseUrl": "https://docs.example.com",
"generatedAt": "2026-05-10T20:30:13.572Z",
"baseUrl": "https://leadtype.dev",
"product": {
"name": "Leadtype",
"summary": "A docs pipeline that turns one MDX source into a website, agent-readable bundles, and a search index."
Expand All @@ -11,22 +11,22 @@
"title": "Leadtype",
"description": "One MDX source. A website for humans, AGENTS.md for offline coding agents, llms.txt for HTTP agents — all from a single pipeline.",
"urlPath": "/docs",
"absoluteUrl": "https://docs.example.com/docs",
"absoluteUrl": "https://leadtype.dev/docs",
"markdownUrlPath": "/docs/index.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/index.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/index.md",
"relativePath": "index",
"groups": [
"get-started"
],
"lastModified": "2026-05-10T03:32:19.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Components",
"description": "MDX components the pipeline knows how to flatten into agent-readable markdown.",
"urlPath": "/docs/authoring/components",
"absoluteUrl": "https://docs.example.com/docs/authoring/components",
"absoluteUrl": "https://leadtype.dev/docs/authoring/components",
"markdownUrlPath": "/docs/authoring/components.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/authoring/components.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/authoring/components.md",
"relativePath": "authoring/components",
"groups": [
"authoring"
Expand All @@ -37,9 +37,9 @@
"title": "Frontmatter",
"description": "Required fields, group semantics, and how authored MDX becomes a navigation tree.",
"urlPath": "/docs/authoring/frontmatter",
"absoluteUrl": "https://docs.example.com/docs/authoring/frontmatter",
"absoluteUrl": "https://leadtype.dev/docs/authoring/frontmatter",
"markdownUrlPath": "/docs/authoring/frontmatter.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/authoring/frontmatter.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/authoring/frontmatter.md",
"relativePath": "authoring/frontmatter",
"groups": [
"authoring"
Expand All @@ -50,9 +50,9 @@
"title": "Bundle docs into a package",
"description": "Ship agent-readable docs inside an npm tarball — AGENTS.md at the package root plus per-topic .md files.",
"urlPath": "/docs/build/bundle-package-docs",
"absoluteUrl": "https://docs.example.com/docs/build/bundle-package-docs",
"absoluteUrl": "https://leadtype.dev/docs/build/bundle-package-docs",
"markdownUrlPath": "/docs/build/bundle-package-docs.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/build/bundle-package-docs.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/build/bundle-package-docs.md",
"relativePath": "build/bundle-package-docs",
"groups": [
"build"
Expand All @@ -63,35 +63,35 @@
"title": "Connect a docs site",
"description": "Wire leadtype into a docs app build so humans, agents, and search use one source.",
"urlPath": "/docs/build/connect-docs-site",
"absoluteUrl": "https://docs.example.com/docs/build/connect-docs-site",
"absoluteUrl": "https://leadtype.dev/docs/build/connect-docs-site",
"markdownUrlPath": "/docs/build/connect-docs-site.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/build/connect-docs-site.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/build/connect-docs-site.md",
"relativePath": "build/connect-docs-site",
"groups": [
"build"
],
"lastModified": "2026-05-10T03:32:19.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Optimize docs for agents",
"description": "Set up llms.txt, markdown mirrors, JSON-LD, sitemaps, robots.txt, and audit checks for an agent-readable docs site.",
"urlPath": "/docs/build/optimize-docs-for-agents",
"absoluteUrl": "https://docs.example.com/docs/build/optimize-docs-for-agents",
"absoluteUrl": "https://leadtype.dev/docs/build/optimize-docs-for-agents",
"markdownUrlPath": "/docs/build/optimize-docs-for-agents.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/build/optimize-docs-for-agents.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/build/optimize-docs-for-agents.md",
"relativePath": "build/optimize-docs-for-agents",
"groups": [
"build"
],
"lastModified": "2026-05-10T05:16:57.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Validate in CI",
"description": "Run leadtype lint in CI so frontmatter, navigation, and link issues fail PRs before publish.",
"urlPath": "/docs/build/validate-in-ci",
"absoluteUrl": "https://docs.example.com/docs/build/validate-in-ci",
"absoluteUrl": "https://leadtype.dev/docs/build/validate-in-ci",
"markdownUrlPath": "/docs/build/validate-in-ci.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/build/validate-in-ci.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/build/validate-in-ci.md",
"relativePath": "build/validate-in-ci",
"groups": [
"build"
Expand All @@ -102,22 +102,22 @@
"title": "How it works",
"description": "The mental model: one MDX source, a remark pipeline, two output modes, three audiences.",
"urlPath": "/docs/how-it-works",
"absoluteUrl": "https://docs.example.com/docs/how-it-works",
"absoluteUrl": "https://leadtype.dev/docs/how-it-works",
"markdownUrlPath": "/docs/how-it-works.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/how-it-works.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/how-it-works.md",
"relativePath": "how-it-works",
"groups": [
"get-started"
],
"lastModified": "2026-05-10T03:32:19.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Methodology",
"description": "How leadtype differs from Fumadocs, Starlight, and Mintlify.",
"urlPath": "/docs/methodology",
"absoluteUrl": "https://docs.example.com/docs/methodology",
"absoluteUrl": "https://leadtype.dev/docs/methodology",
"markdownUrlPath": "/docs/methodology.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/methodology.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/methodology.md",
"relativePath": "methodology",
"groups": [
"get-started"
Expand All @@ -128,35 +128,35 @@
"title": "Quickstart",
"description": "Install leadtype, run it against a docs folder, and inspect the artifacts it produces.",
"urlPath": "/docs/quickstart",
"absoluteUrl": "https://docs.example.com/docs/quickstart",
"absoluteUrl": "https://leadtype.dev/docs/quickstart",
"markdownUrlPath": "/docs/quickstart.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/quickstart.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/quickstart.md",
"relativePath": "quickstart",
"groups": [
"get-started"
],
"lastModified": "2026-05-10T03:32:19.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "CLI",
"description": "leadtype generate and leadtype lint — flags, exit codes, and JSON output.",
"urlPath": "/docs/reference/cli",
"absoluteUrl": "https://docs.example.com/docs/reference/cli",
"absoluteUrl": "https://leadtype.dev/docs/reference/cli",
"markdownUrlPath": "/docs/reference/cli.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/cli.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/cli.md",
"relativePath": "reference/cli",
"groups": [
"reference"
],
"lastModified": "2026-05-10T03:32:19.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Convert",
"description": "MDX-to-markdown conversion APIs from leadtype/convert.",
"urlPath": "/docs/reference/convert",
"absoluteUrl": "https://docs.example.com/docs/reference/convert",
"absoluteUrl": "https://leadtype.dev/docs/reference/convert",
"markdownUrlPath": "/docs/reference/convert.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/convert.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/convert.md",
"relativePath": "reference/convert",
"groups": [
"reference"
Expand All @@ -167,9 +167,9 @@
"title": "Lint rules",
"description": "Schema, link, and navigation checks. CLI and library API.",
"urlPath": "/docs/reference/lint",
"absoluteUrl": "https://docs.example.com/docs/reference/lint",
"absoluteUrl": "https://leadtype.dev/docs/reference/lint",
"markdownUrlPath": "/docs/reference/lint.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/lint.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/lint.md",
"relativePath": "reference/lint",
"groups": [
"reference"
Expand All @@ -180,22 +180,22 @@
"title": "LLM bundles",
"description": "Generate llms.txt for hosted websites and AGENTS.md for npm-bundled offline reading.",
"urlPath": "/docs/reference/llm",
"absoluteUrl": "https://docs.example.com/docs/reference/llm",
"absoluteUrl": "https://leadtype.dev/docs/reference/llm",
"markdownUrlPath": "/docs/reference/llm.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/llm.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/llm.md",
"relativePath": "reference/llm",
"groups": [
"reference"
],
"lastModified": "2026-05-10T05:16:57.000Z"
"lastModified": "2026-05-10T06:25:37.000Z"
},
{
"title": "Remark plugins",
"description": "The default plugin stack that flattens MDX components into markdown.",
"urlPath": "/docs/reference/remark",
"absoluteUrl": "https://docs.example.com/docs/reference/remark",
"absoluteUrl": "https://leadtype.dev/docs/reference/remark",
"markdownUrlPath": "/docs/reference/remark.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/remark.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/remark.md",
"relativePath": "reference/remark",
"groups": [
"reference"
Expand All @@ -206,9 +206,9 @@
"title": "Search",
"description": "Static search index, runtime helpers, and source-grounded answer streaming.",
"urlPath": "/docs/reference/search",
"absoluteUrl": "https://docs.example.com/docs/reference/search",
"absoluteUrl": "https://leadtype.dev/docs/reference/search",
"markdownUrlPath": "/docs/reference/search.md",
"markdownAbsoluteUrl": "https://docs.example.com/docs/reference/search.md",
"markdownAbsoluteUrl": "https://leadtype.dev/docs/reference/search.md",
"relativePath": "reference/search",
"groups": [
"reference"
Expand Down
2 changes: 1 addition & 1 deletion apps/example/src/generated/docs-search-content.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/example/src/generated/docs-search-index.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions apps/example/tests/e2e/smoke.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ test("agent readability discovery files are served at the site root", async ({
const llmsText = await llmsTxt.text();
expect(llmsText).toContain("](/docs/index.md)");
expect(llmsText).toContain("](/docs/quickstart.md)");
expect(llmsText).not.toContain("https://docs.example.com/docs/quickstart");
expect(llmsText).not.toContain("https://leadtype.dev/docs/quickstart");

for (const urlPath of ["/docs/index.md", "/docs/quickstart.md"]) {
const markdownMirror = await request.get(urlPath);
Expand All @@ -194,7 +194,7 @@ test("docs pages expose canonical and markdown mirror metadata", async ({
expect(htmlResponse.ok()).toBe(true);
const html = await htmlResponse.text();
expect(html).toContain('rel="canonical"');
expect(html).toContain("https://docs.example.com/docs/quickstart");
expect(html).toContain("https://leadtype.dev/docs/quickstart");
expect(html).toContain('rel="alternate"');
expect(html).toContain('type="text/markdown"');
expect(html).toContain('property="og:title"');
Expand All @@ -207,7 +207,7 @@ test("docs pages expose canonical and markdown mirror metadata", async ({
expect(markdownResponse.ok()).toBe(true);
expect(markdownResponse.headers().vary).toContain("Accept");
expect(markdownResponse.headers().link).toContain(
'<https://docs.example.com/docs/quickstart>; rel="canonical"'
'<https://leadtype.dev/docs/quickstart>; rel="canonical"'
);
expect(markdownResponse.headers()["cache-control"]).toContain("max-age=300");
const markdown = await markdownResponse.text();
Expand Down
Loading
Loading