Package exports
The generated API reference contains signatures and type definitions for the public entry points. Each documentation line shows the API from its selected published snapshot.
Use @pinanek/docskit for configuration and types. Import React components from
their dedicated entry points so configuration can load without a React server
environment.
import { defineDocs } from "@pinanek/docskit";
import type { DocsConfig, MDXComponents, MetadataValues } from "@pinanek/docskit";
Entry points
| Import | Exports | Use |
|---|---|---|
@pinanek/docskit | defineDocs, configuration types, content types, metadata types, navigation and URL helpers | Config files and type imports |
@pinanek/docskit/config | Same as the root import | Explicit configuration entry point |
@pinanek/docskit/link | Link | Client navigation in custom components |
@pinanek/docskit/metadata | Metadata, MetadataValues | Page title, canonical URL, and social metadata |
@pinanek/docskit/mdx | components | Built-in Markdown component map |
@pinanek/docskit/layout | RootElement, SiteLayout, DocsLayout | Shared layouts for advanced integrations |
@pinanek/docskit/content | createDocuments, DocumentModule, DocumentRecord, DocumentCollection | Content collection and Markdown link resolution |
@pinanek/docskit/documents | Document, getStaticPaths | Configured documentation rendering |
@pinanek/docskit/styles.css | Shared stylesheet | Advanced integrations that supply their own application shell |
@pinanek/docskit/client | Ambient Markdown module declarations | Markdown imports in TypeScript |
The CLI loads the shared stylesheet and Markdown declarations automatically.
Custom homepages normally need only link and metadata. The configured
metadata, mdx, layout, and documents modules run inside a Docskit site;
they use its configuration, styles, or generated content.
Without the CLI, load Markdown declarations from a declaration file such as
env.d.ts:
import "@pinanek/docskit/client";
This entry point contains types only; do not import it from runtime JavaScript.
The root exports DocsConfig, ResolvedDocsConfig, NavLink, FooterLink,
Group, Item, ThemeAsset, OgImageConfig, VersioningConfig, MDXComponents, MetadataValues,
DocumentModule, DocumentRecord, DocumentCollection, and TocItem as types.
Use import type for these exports.
URL and navigation helpers
normalizeBasePath(path)normalizes a deployment path, such as/project/.withBasePath(path, basePath)prefixes a local URL and preserves external URLs.pagePath(path)adds a trailing slash to page URLs while preserving assets, queries, and fragments.flattenNavigation(items)returns links from navigation groups.
The shared link and metadata components already handle deployment paths. Use the helpers when constructing URLs outside those components.
Internal modules
Paths under @pinanek/docskit/internal/* support the generated application.
They include framework configuration, runtime layouts and routes, OG generation,
and virtual-module declarations. They may change with the implementation; use
the public entry points in project code.
Keep custom components in your project and reference them through
docskit.config.ts. See Components and styles for examples.