View, Download, and Publish Docs
Open generated docs when you need a fast browser view, then download the same output when you want a stable artifact to review, archive, or host somewhere else. The key choice is whether you want a moving "latest" link or one exact variant pinned to a branch, provider, and model.
Prerequisites
- A docs variant already exists and is
ready. - You can sign in to docsfy in the browser, or you have a valid API key for
Authorization: Bearer .... - If you use the CLI,
docsfyis already configured to reach your server.
Quick Example
$SERVER/docs/<project>/
curl -s -L -H "Authorization: Bearer $API_KEY" \
"$SERVER/api/projects/<project>/<branch>/<provider>/<model>/download" \
-o "<project>-<branch>-<provider>-<model>-docs.tar.gz"
mkdir -p published-docs
tar -xzf "<project>-<branch>-<provider>-<model>-docs.tar.gz" \
--strip-components=1 \
-C published-docs
Open the first URL when you just want the newest ready docs you can access. Use the download command when you want one exact build that you can extract and publish as a normal static site.
Step-by-Step
- Choose whether you want a moving link or a pinned build.
| If you want... | Open in the browser | Download the site | Downloaded file |
|---|---|---|---|
| The latest ready docs you can access | /docs/<project>/ |
/api/projects/<project>/download |
<project>-docs.tar.gz |
| One exact build | /docs/<project>/<branch>/<provider>/<model>/ |
/api/projects/<project>/<branch>/<provider>/<model>/download |
<project>-<branch>-<provider>-<model>-docs.tar.gz |
Warning: The short project routes move when a newer ready variant becomes available. Use the full variant URL when you need a stable bookmark, review link, or published release artifact.
- Open the docs in the browser.
$SERVER/docs/<project>/
$SERVER/docs/<project>/<branch>/<provider>/<model>/
If you are using the web app, open the ready variant and click View Documentation. Use the full variant URL when the branch, provider, and model must stay fixed.
- Download the exact site you want to publish.
curl -s -L -H "Authorization: Bearer $API_KEY" \
"$SERVER/api/projects/<project>/<branch>/<provider>/<model>/download" \
-o "<project>-<branch>-<provider>-<model>-docs.tar.gz"
If you prefer the web app, click Download on the ready variant. Exact downloads are the safest choice for publishing because they stay pinned to the build you selected.
Note: Exact variant downloads return
400until that variant isready. The short project download returns404if there is no ready variant it can use.
- Extract the archive into a publishable folder.
mkdir -p published-docs
tar -xzf "<project>-<branch>-<provider>-<model>-docs.tar.gz" \
--strip-components=1 \
-C published-docs
ls published-docs
After extraction, keep the generated bundle together. The folder includes index.html, generated page HTML files, assets/, search-index.json, llms.txt, and llms-full.txt.
- Publish the extracted folder like any other static site.
Upload the contents of published-docs/ to your static host or web server, and use index.html as the entry point. There is no separate external publish command in docsfy; once extracted, the output is a normal static site.
Tip: The generated site includes a
.nojekyllfile, so you can publish it as-is on GitHub Pages-style static hosting.Warning: Once you publish the files outside docsfy, docsfy's sign-in and access checks no longer protect them. Use your host, CDN, or proxy for access control if the published docs must stay private.
Advanced Usage
### Download with the CLIdocsfy download <project>
docsfy download <project> --branch <branch> --provider <provider> --model <model>
docsfy download <project> --branch <branch> --provider <provider> --model <model> --output ./published-docs
$SERVER/docs/<project>/<branch>/<provider>/<model>/?owner=<username>
$SERVER/api/projects/<project>/<branch>/<provider>/<model>/download?owner=<username>
Troubleshooting
-
Getting redirected to
/loginor seeing401: sign in to the web app first, or sendAuthorization: Bearer <api-key>with direct requests. -
Getting
404from a docs or download URL: there may be no ready variant for that route, or you may not have access to that project's docs. -
Seeing
400 Variant not readyon an exact download: wait until generation finishes, then retry the same exact URL. -
Published pages load without styling or search: upload the whole extracted folder, not just
index.html. -
The CLI says you must specify
--branch,--provider, and--modeltogether: provide all three to target one exact variant, or omit all three to use the latest ready archive.
See Fix Setup and Generation Problems for broader auth, access, and readiness issues.