Deploying this site
This site is internal-only. It is deployed manually with Wrangler to Cloudflare Pages and protected by Cloudflare Access (email-based login in front of the URL).
Prerequisites (once)
Section titled “Prerequisites (once)”cd docs-sitenpm installnpx wrangler login # opens the browser; use your Cloudflare accountThen create the Pages project (once):
npx wrangler pages project create chorki-docs --production-branch=mainDeploy
Section titled “Deploy”From docs-site/:
npm run deployThat runs the deep-dive sync, builds the site, and deploys dist/ to the
chorki-docs Pages project. The site goes live at
https://chorki-docs.pages.dev (and any custom domain attached to the
project). If you change the project name, update site in
astro.config.mjs.
Local development
Section titled “Local development”npm run sync:deep-dives # mirror ../docs into the Deep Dives sectionnpm run dev # http://localhost:4321The Deep Dives section is generated from ../docs/ — never edit files
under src/content/docs/deep-dives/ directly; edit the source walkthroughs
in docs/ and re-run the sync.
Locking it down with Cloudflare Access
Section titled “Locking it down with Cloudflare Access”The Pages URL is public by default; Access puts authentication in front of it.
- Go to the Cloudflare dashboard → Zero Trust → Access → Applications → Add an application → Self-hosted.
- Application name:
Chorki Docs. Application domain:chorki-docs.pages.dev(include any custom domain you attach later as an additional domain). - Add a policy: Action = Allow, Include =
Emails ending in @chorki.net(or an explicit list of team emails, or email OTP for one-off reviewers). - Save. Visiting the site now redirects to a Cloudflare login page; only matching identities get through.
Notes:
- Access sits in front of the whole
pages.devhostname, previews included (<hash>.chorki-docs.pages.devis covered by the domain config above). - Since the site is behind Access, publishing all internal walkthroughs (including the security deep dives) is acceptable — but think twice before attaching a public custom domain.
What gets deployed
Section titled “What gets deployed”| Section | Source | Refreshed |
|---|---|---|
| Getting Started, Architecture, Features, Reference, this page | hand-written in docs-site/src/content/docs/ |
edit directly |
| Deep Dives | generated from the repo’s docs/ folder |
npm run sync:deep-dives (also runs in deploy) |