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.
"url": "https://docs.example.com" to your docslit.json before building. This enables absolute URLs in your sitemap and llms.txt.
Deploy to a hosting provider
npx docslit build with the output directory set to dist.
npx docslit build with the publish directory set to dist.
Create .github/workflows/deploy.yml:
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 |
Custom output directory
Use the --out flag to change the output directory: