Problem
The c15t example currently fetches source content manually:
apps/c15t-example/scripts/setup-source.ts clones https://github.com/c15t/c15t into .docs-src/c15t.
apps/c15t-example/scripts/generate-artifacts.ts then runs Leadtype against that local checkout with mounted docs directories.
This is directionally correct, but the source acquisition step lives outside Leadtype. Any project that wants docs from another repository has to recreate the same glue.
Proposal
Add declarative local and remote source acquisition to Leadtype.
Example:
export default defineDocsConfig({
sources: {
c15t: {
repository: "https://github.com/c15t/c15t",
ref: "main",
cacheDir: ".docs-src/c15t",
mounts: [
{ dir: "docs", path: "/docs" },
{ dir: "changelog", path: "/changelog" },
],
},
},
});
Leadtype should resolve remote sources to local files at build time, then run the existing artifact pipeline unchanged.
CLI Shape
Potential commands/flags:
leadtype sync
leadtype generate --sync
leadtype generate --refresh
leadtype generate --offline
Expected behavior:
sync clones/fetches configured sources.
generate uses already-present local sources by default.
--sync clones missing sources.
--refresh updates existing sources.
--offline fails if required sources are missing.
Framework Integration Notes
Source acquisition is core behavior, but each framework recipe should show where it runs:
- Next.js: prebuild script or CI step.
- Nuxt: package script or Nitro build hook.
- SvelteKit: package prebuild script.
- Astro: integration/build script.
- TanStack/Vite: package prebuild script.
Runtime apps should not clone Git repositories on request.
Acceptance Criteria
Problem
The c15t example currently fetches source content manually:
apps/c15t-example/scripts/setup-source.tscloneshttps://github.com/c15t/c15tinto.docs-src/c15t.apps/c15t-example/scripts/generate-artifacts.tsthen runs Leadtype against that local checkout with mounted docs directories.This is directionally correct, but the source acquisition step lives outside Leadtype. Any project that wants docs from another repository has to recreate the same glue.
Proposal
Add declarative local and remote source acquisition to Leadtype.
Example:
Leadtype should resolve remote sources to local files at build time, then run the existing artifact pipeline unchanged.
CLI Shape
Potential commands/flags:
Expected behavior:
syncclones/fetches configured sources.generateuses already-present local sources by default.--syncclones missing sources.--refreshupdates existing sources.--offlinefails if required sources are missing.Framework Integration Notes
Source acquisition is core behavior, but each framework recipe should show where it runs:
Runtime apps should not clone Git repositories on request.
Acceptance Criteria
--offlineworks for CI/reproducible builds.