Problem
Leadtype supports docs directories and mounts, but the product model is still mostly "a docs folder." Larger docs systems need to describe multiple content sets with clear schemas, route prefixes, and artifact behavior.
Nuxt Content's collection model is a useful inspiration point, but Leadtype should keep the implementation framework-neutral and artifact-oriented.
Proposal
Introduce collection-style config for source files, route prefixes, schemas, and artifact inclusion.
Example:
export default defineDocsConfig({
collections: {
docs: defineCollection({
source: "docs/**/*.mdx",
prefix: "/docs",
schema: docsFrontmatterSchema,
}),
changelog: defineCollection({
source: "changelog/**/*.mdx",
prefix: "/changelog",
schema: changelogFrontmatterSchema,
}),
},
});
Collections should map cleanly onto current --docs-dir/mount behavior while giving users a typed, explicit mental model.
Core Behavior
- Collections are framework-neutral.
- A collection describes source globs, route prefix, schema, and generated-artifact participation.
- Generated navigation, search, markdown mirrors,
llms.txt, and Agent Readability metadata preserve collection route prefixes.
Framework Integration Notes
Adapters/recipes can map collections to native host concepts:
- Next.js:
generateStaticParams().
- SvelteKit:
entries() and server load.
- Astro:
getStaticPaths() and optional Content Collections interop.
- Nuxt: route generation/Nitro conventions without requiring Nuxt Content.
- Fumadocs: source adapter shape.
Acceptance Criteria
Problem
Leadtype supports docs directories and mounts, but the product model is still mostly "a docs folder." Larger docs systems need to describe multiple content sets with clear schemas, route prefixes, and artifact behavior.
Nuxt Content's collection model is a useful inspiration point, but Leadtype should keep the implementation framework-neutral and artifact-oriented.
Proposal
Introduce collection-style config for source files, route prefixes, schemas, and artifact inclusion.
Example:
Collections should map cleanly onto current
--docs-dir/mount behavior while giving users a typed, explicit mental model.Core Behavior
llms.txt, and Agent Readability metadata preserve collection route prefixes.Framework Integration Notes
Adapters/recipes can map collections to native host concepts:
generateStaticParams().entries()and serverload.getStaticPaths()and optional Content Collections interop.Acceptance Criteria
defineCollection()exists and is documented.