Deployment
Build and deploy Docgo's static output to any static host.
Docgo builds a static site into outDir, which defaults to dist.
npx docgo buildDeploy the contents of dist to any static hosting provider.
Production checklist
Before deploying:
- Set
siteUrlto the public docs URL. - Set
baseUrlif the site is hosted under a sub-path. - Replace
public/favicon.pngandpublic/logo.png. - Add a real social preview image such as
public/og.png. - Confirm
seo.sitemap,seo.robots, andseo.llmsTxtare configured. - Run
npx docgo build.
Root hosting
For a site hosted at the domain root:
export default defineConfig({
baseUrl: '/',
siteUrl: 'https://docs.example.com',
});Sub-path hosting
For a site hosted at https://example.com/docs/:
export default defineConfig({
baseUrl: '/docs/',
siteUrl: 'https://example.com/docs/',
});Docgo prefixes generated asset and internal navigation URLs with /docs/.
Static host output
A typical output looks like this:
dist/
index.html
guide/
getting-started/
index.html
guide/getting-started.md
assets/
client-*.js
search-index/
en/
latest.json
docgo.css
bmates-ui.css
sitemap.xml
robots.txt
llms.txt
favicon.png
logo.pngClean URLs
Docgo writes routes as directories with index.html.
/guide/getting-started -> dist/guide/getting-started/index.htmlYour host should serve directory index.html files for clean URLs. Most static
hosts do this by default.
Client navigation
The first load is static HTML. The client bundle hydrates interactive controls such as search, dropdowns, sidebars, code groups, page actions, and theme toggling.
CI command
Use the build command in CI:
npm ci
npm run buildIf your project uses the package scripts generated by Docgo's own repository, the build script runs:
tsx ./bin/docgo.ts buildFor an installed package, use docgo build or npx docgo build.
