Reusable documentation runtime and tooling for SvelteKit. It turns a Markdown directory into rendered pages, navigation, search, edit links, and a responsive documentation layout.
Create a complete SvelteKit docs site:
pnpm dlx --package @goobits/docs-engine-cli create-docs-engine my-docs
cd my-docs
pnpm devThe scaffold includes the SvelteKit routes, sample Markdown, search endpoint, styles, type checking, link checking, and production build configuration.
For an existing SvelteKit app:
pnpm add @goobits/docs-engine @lucide/svelteSee Getting Started for the route files and configuration.
| Package | Owns |
|---|---|
@goobits/docs-engine |
Markdown rendering, components, SvelteKit adapter, navigation, search, and server utilities |
@goobits/docs-engine-cli |
Project scaffolding, API reference generation, link checking, and docs version commands |
The adapter is the shortest supported integration. Give it Markdown loaders and reuse its page, layout, and search handlers:
import { error } from '@sveltejs/kit';
import {
createDocsLayoutLoad,
createDocsPageLoad,
createDocsSearchHandler,
createSvelteKitDocs,
type MarkdownModuleLoader,
} from '@goobits/docs-engine/sveltekit';
const modules = import.meta.glob('../../../docs/**/*.md', {
import: 'default',
query: '?raw',
}) as Record<string, MarkdownModuleLoader>;
const docs = createSvelteKitDocs({
modules,
config: {
routePrefix: '/docs',
screenshots: { enabled: false },
},
});
export const loadDocsLayout = createDocsLayoutLoad(docs);
export const loadDocsPage = createDocsPageLoad(docs, error);
export const getDocsSearch = createDocsSearchHandler(docs);Render returned page data with DocsLayout from @goobits/docs-engine/components, and import @goobits/docs-engine/styles once in the host app.
@goobits/docs-engine: top-level documentation configuration@goobits/docs-engine/sveltekit: Markdown directory adapter for SvelteKit@goobits/docs-engine/components: Svelte documentation UI@goobits/docs-engine/server: Node-only rendering, screenshots, Git, and file operations@goobits/docs-engine/plugins: low-level Markdown plugins@goobits/docs-engine/reference: symbol resolution and source-link rendering@goobits/docs-engine/styles: shared documentation styles
Import components through the components entry point. Component implementation files are private so releases can reorganize them without breaking consumers.
Package imports resolve to compiled JavaScript. The source export condition remains available to linked monorepo development.
Install the CLI in an existing project:
pnpm add -D @goobits/docs-engine-cliCommon commands:
docs-engine check-links --base-dir docs --public-dir static
docs-engine reference --root . --source 'src/**/*.ts' --output-dir docs/api
docs-engine version list --docs-dir docsSee the CLI README for command options.
Licensed under the Functional Source License, Version 1.1, ALv2 Future License. Each released version becomes available under Apache License 2.0 two years after release. See LICENSE.