Static hosting
DocsLit builds a standard static site that you can deploy to any hosting provider. Run docslit build and upload the dist/ directory.
Build your site
This generates a dist/ directory with HTML pages, a search index, sitemap, and AI discovery files.
Deploy recipes
Generate host-specific config files from the CLI:
For GitHub project sites (https://user.github.io/repo/), set "basePath": "/repo" in docslit.json so asset and navigation URLs stay correct.
Deploy to a hosting provider
Alternatively, connect your git repository to Vercel and set the build command to docslit build with the output directory set to dist.
For continuous deployment, connect your repository and set the build command to docslit build with the publish directory set to dist.
Create .github/workflows/deploy.yml:
Go to your repository Settings > Pages and set the source to GitHub Actions.
Enable static website hosting on your S3 bucket and set index.html as the index document. Optionally, put CloudFront in front for HTTPS and caching.
What gets deployed
Every build produces these files:
| File | Purpose |
|---|---|
index.html | App shell with navigation and components |
docs/*.html | Pre-rendered pages for SEO |
docs/*.md | Raw Markdown for programmatic access |
search-index.json | Client-side full-text search |
sitemap.xml | Search engine sitemap |
robots.txt | Crawler directives |
llms.txt | AI agent discovery index |
llms-full.txt | Complete docs as plain text |
_middleware.js | Content negotiation for AI agents (Cloudflare/Netlify) |
vercel.json | Content negotiation for AI agents (Vercel) |
.well-known/agent.json | Machine-readable agent discovery |
mcp-server.js | MCP server for AI tool integration |
pdf/ | Chapter, page, and full documentation PDFs (when built with --pdf) |
docslit build --pdf to generate downloadable PDF manuals alongside your HTML site. See Chapter PDF export.Custom output directory
Use the --out flag to change the output directory: