feat: publish markdown sources and a blob index under /docs-api - #188
Merged
Merged
Conversation
Deploying documents with
|
| Latest commit: |
e7c7c83
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9f3351fe.documents-dq4.pages.dev |
| Branch Preview URL: | https://feat-raw-docs-mirror.documents-dq4.pages.dev |
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Decision: after merge, the site serves every document's markdown source (about 2 MB) and a 27 KB index at stable URLs that the Prompt CLI will read; the paths and index format must stay stable. Check once deployed:
curl -sI https://docs.nbtca.space/docs-api/raw/about/join.mdshowscontent-type: text/plain, and a missing raw path returns 404. (utils/docs-api.ts,public/_headers)The Prompt CLI reads documents through the GitHub API and raw.githubusercontent.com, which often reset or time out from mainland China; docs.nbtca.space does not.
buildEndhook copies each built page's markdown source to/docs-api/raw/<path>and writes/docs-api/index.jsonin the shape of GitHub's recursive tree, with each file's git blob sha.git hash-objectfor all 247 documents, so the CLI's sha-verified cache keeps working across both sources./docs-api/raw/*is served astext/plainso Cloudflare compresses it.@nbtca/docsfalls back to GitHub whenever this mirror is missing, stale or down (feat: try an optional mirror before GitHub for the tree and files docs#9).