doc-kit generate writes a fully static site, so publishing
is as simple as hosting the output directory.
npx @doc-kit/cli generate
Everything lands in your configured output directory (out/ by
convention). Two things to know about the result:
-
The
htmlsite must be served over HTTP. Its pages use import maps and client-side hydration, so opening the files withfile://may show unstyled or inert pages. Preview a production build the same way you'd host it:npx serve out -
Search requires its index. If your site uses search, generate the index alongside the pages by targeting both generators —
target: ['html', 'orama-db'], so the search box has data to query.
Set baseURL to where the site will live. Generators that emit absolute
URLs (e.g., sitemap, llms-txt) will need it in order to generate their
output.
export default { global: { baseURL: 'https://example.com/docs', }, html: { // Where a page's canonical URL lives; {path} is filled per page pageURL: 'https://example.com/docs{path}.html', }, };
Search engines and language models each get their own artifact — add the generators and they share the same parse:
target: ['html', 'orama-db', 'sitemap', 'llms-txt'],
sitemap emits sitemap.xml; llms-txt emits an
llms.txt index of your pages.
The version selector in the sidebar is built from your changelog — a
release history the generators parse into selectable versions. Point
global.changelog at a CHANGELOG.md (URL or path) that lists your
releases, and each build renders its version with links to the others. A
project without release history simply gets no selector. See the
configuration reference for the accepted formats.