Skip to content

Latest commit

 

History

261 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@goobits/docs-engine

Reusable documentation runtime and tooling for SvelteKit. It turns a Markdown directory into rendered pages, navigation, search, edit links, and a responsive documentation layout.

Quick start

Create a complete SvelteKit docs site:

pnpm dlx --package @goobits/docs-engine-cli create-docs-engine my-docs
cd my-docs
pnpm dev

The 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/svelte

See Getting Started for the route files and configuration.

Packages

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

SvelteKit adapter

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.

Public entry points

  • @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.

CLI

Install the CLI in an existing project:

pnpm add -D @goobits/docs-engine-cli

Common 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 docs

See the CLI README for command options.

Documentation

License

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.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages