Open-source project
cloudflare/cloudflare-docs avatar
cloudflare/cloudflare-docs

cloudflare/cloudflare-docs: the source repository behind developers.cloudflare.com

Cloudflare’s documentation

5,487 stars17,490 forksMDXCC-BY-4.0

At a glance

What is it?
The cloudflare-docs repository is the MDX source for Cloudflare's public developer documentation, built with Astro and pnpm. It is a publishing pipeline, not a documentation generator you point at your own API.
Who is it for?
Adopt it if you are contributing a fix to Cloudflare's own documentation, or if you want a reference implementation of an Astro content site with a Cloudflare Worker in front of it. Do not adopt it as a documentation framework for your own product: the content is Cloudflare's product surface, the licence covers attribution rather than reuse of the Cloudflare marks, and the build expects pnpm plus a prebuild asset fetch.
Can I use it commercially?
Yes, with credit. CC-BY-4.0 allows commercial use as long as you credit the authors and indicate what you changed. It is written for creative content, so check how it applies to any code.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly MDX, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 16, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • cloudflare/cloudflare-docs5,487 ★ · +242
Star history
Repository2026-09-232026-11-16
cloudflare/cloudflare-docs5.2k5.5k

242 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What cloudflare-docs is, and what it is not

This is the content repository for developers.cloudflare.com. The README opens by calling it "the open-source repository for all Cloudflare's Documentation", which is a precise description: the pages you read on that site are authored here in MDX, and the site is published from this codebase. The primary language listed for the repository is MDX, and the top-level entries include src/, public/, templates/, plugins/ and worker/, which is the shape of a content site with a server component rather than a library.

That distinction matters more than it sounds. A documentation generator takes your code and emits pages. cloudflare-docs does the opposite: the prose is the source of truth, and the build pipeline around it exists to render that prose consistently. If you arrive looking for a tool to document your own API, you are in the wrong repository. If you arrived because a Cloudflare page is wrong, you are in exactly the right one, and the README points contributors at the Cloudflare Style Guide for the rules that apply to a pull request.

The audience is therefore narrow and specific. Cloudflare engineers and technical writers who publish here, outside contributors fixing a wrong parameter name or a stale example, and people who want to see how a large vendor runs a public documentation site on Astro. The last push was on 2026-11-02, and the repository is not archived, so the content is being revised continuously by the standards of any public docs site.

MDX content, an Astro build, and a Worker in front

The pipeline is visible in package.json. The site is built by Astro: the build script is "astro build", development is "astro dev", and there is an "astro check" pass wired into the check script with --minimumFailingSeverity=hint. Content lives under src/, and the repository also carries astro.config.ts and tsconfig.json.

The more interesting part is the prebuild step. The prebuild script runs "pnpm run fetch:assets", and the predev script runs three fetchers in sequence with a --soft flag: tsx bin/fetch-skills.ts --soft, tsx bin/fetch-openapi.ts --soft, then tsx bin/fetch-logpush-datasets.ts --soft. In other words, a meaningful amount of what appears on the site is not committed as prose and rendered. It is fetched from upstream sources at build or dev time. OpenAPI schemas, skills metadata and logpush datasets are pulled in, then the MDX and the templates render around them.

That design has a real consequence. The repository is not self-contained: a build depends on those upstream fetches succeeding, or on the --soft flag letting the build continue when they do not. It also means the documentation can drift from a product surface if the fetch source changes shape, which is a failure mode a purely static docs repository does not have. There is a separate worker/ directory with its own tsconfig and a check:worker script running tsc --noEmit, plus wrangler.jsonc, wrangler.preview.json and wrangler.preview.test.json at the root, so part of the site runs as a Cloudflare Worker rather than as static files.

Installing cloudflare-docs and making a first edit

The repository enforces its package manager. The preinstall script is "npx --yes only-allow pnpm", so an npm or yarn install is rejected before it starts. Clone, then install with pnpm:

bash
git clone https://github.com/cloudflare/cloudflare-docs.git
cd cloudflare-docs
pnpm install

Version pinning is handled by .node-version and .nvmrc at the root; the README does not document a minimum Node release, so read those files rather than guessing. Next, start the dev server. Note that "pnpm dev" triggers the predev hook, which fetches skills, OpenAPI and logpush datasets before Astro starts:

bash
pnpm dev

Astro then serves the site locally, and edits under src/ hot reload. If you want to skip the fetch step, the predev hook is the thing to look at; the scripts call the fetchers with --soft, and the README does not document an environment variable to disable them entirely. Before opening a pull request, run the formatting and check passes, which are split by file type:

bash
pnpm format:check
pnpm check

format:check fans out to format:core:check, format:data:check and format:content:check, covering JS/TS/CSS, JSON/YAML, and .astro files respectively through Prettier. The check script runs astro check and then tsc against worker/tsconfig.json. There is also a vitest.config.ts at the root, and "pnpm build" for a full production build. The README does not document rollback or a revert procedure for a bad merge, and it does not describe a staging URL.

Where cloudflare-docs is the wrong tool

The licence is the first constraint, and it is not a formality. The README states that content is licensed under Creative Commons Attribution 4.0 International and that code in the repository is under the MIT License, with separate LICENSE and LICENSE-CODE files. CC-BY-4.0 permits reuse with attribution, but the same README adds that the licences do not grant rights to Cloudflare names, logos or trademarks, and points to Cloudflare's trademark guidelines. So you can copy a page and attribute it; you cannot present it in a way that implies Cloudflare endorses your product. That is a normal arrangement, but it means the repository is not a source of freely rebrandable documentation.

The second constraint is structural. This is one vendor's documentation for one vendor's products. The templates, the fetchers and the Worker exist to serve developers.cloudflare.com, and nothing in the README suggests they were designed for reuse elsewhere. Forking it to document a different product means stripping the fetchers, replacing the templates and rewriting the navigation, at which point you have written your own site and kept Astro.

The third is operational. Because the prebuild and predev steps reach out to upstream sources, a contributor working offline, or in a network that blocks those endpoints, hits the fetchers before seeing a single page. The --soft flag suggests the maintainers expect those fetches to fail sometimes, but the README does not document what the site looks like when they do. And the repository explicitly notes that AI tools may be used to review documentation, pull requests and issues, with a request not to include personal information in submissions. If you are contributing, that is worth knowing before you paste anything into a comment.

How this differs from Docusaurus or a docs-as-code generator

The obvious comparison is Docusaurus, and the difference is in what each one is optimised for. Docusaurus is a framework you install in your own repository: you bring the content, it brings versioned sidebars, a plugin system and a build that assumes it owns the whole site. cloudflare-docs is a single deployed site whose content happens to be public. You contribute to it; you do not run it as your own.

The technical difference follows from that. cloudflare-docs pulls live data at build time through bin/fetch-openapi.ts and its siblings, so parts of the published pages are generated from upstream schemas rather than hand-written. A typical Docusaurus setup either commits generated reference pages or uses a plugin to do the same thing, and the generated output is checked in. Here the fetch happens on every prebuild and predev, which keeps the reference material closer to the source of truth at the cost of a build that depends on a network call.

There is also the Worker. The presence of worker/ and wrangler.jsonc means this site is not purely static output. A Docusaurus site can be deployed to a CDN as files; this one has a server-side component with its own TypeScript check. If your documentation is static and small, that is extra machinery you do not need. If you are publishing thousands of pages with generated reference material and want a server in the path, the split is instructive.

Maintenance, contribution cost and licence terms

The repository is not archived and the last push was on 2026-11-02, so it is under continuous revision. The practical cost for a contributor is not the edit itself but the tooling around it. You need pnpm, a Node version matching .node-version or .nvmrc, network access for the predev fetchers, and a clean run of pnpm format:check and pnpm check before a pull request is likely to be reviewed. The toolchain is pinned hard: Prettier configuration lives in .prettierrc.mjs, ESLint in eslint.config.js, and there is a _typos.toml for spell checking, plus a .husky/ directory for git hooks.

On licensing, the split is the thing to internalise: CC-BY-4.0 for the documentation content, MIT for the code, with attribution as the operative obligation for the former. The README also states that Cloudflare and contributors reserve all other rights under copyright, patent and trademark, and that the licences grant no rights to the Cloudflare marks. That is a statement of scope, not legal advice, and if you plan to redistribute content at scale you should read the LICENSE and LICENSE-CODE files directly rather than relying on the README summary.

The README does not document a release process, and the repository has no published releases. Contributions appear to land on the production branch via pull requests, which means there is no versioned documentation set to pin against. If you are citing a Cloudflare page in your own work, cite the live URL, not a repository commit.

Editorial conclusion

Adopt it if you are contributing a fix to Cloudflare's own documentation, or if you want a reference implementation of an Astro content site with a Cloudflare Worker in front of it. Do not adopt it as a documentation framework for your own product: the content is Cloudflare's product surface, the licence covers attribution rather than reuse of the Cloudflare marks, and the build expects pnpm plus a prebuild asset fetch. Verify first that pnpm install completes on your Node version, that bin/fetch-openapi.ts can reach its upstream, and that you are editing under src/ rather than anything generated.

Frequently asked questions

What is cloudflare-docs?

It is the open source repository for Cloudflare's developer documentation, hosted at developers.cloudflare.com. Pages are authored in MDX and the site is built with Astro, with a Cloudflare Worker component in the worker/ directory.

Is cloudflare-docs safe?

The repository is a public documentation source under CC-BY-4.0 for content and MIT for code, and it is not archived. The README does note that AI tools may be used to review documentation and pull requests, and asks contributors not to share personal information in submissions.

Are Cloudflare Pages discontinued?

The README does not address the status of individual Cloudflare products. It describes the documentation repository itself, its contribution process and its licensing, and points readers to developers.cloudflare.com for product documentation.

Official sources

  1. cloudflare/cloudflare-docs on GitHub
  2. Issues
  3. License: CC-BY-4.0
  4. Project website
  5. README
Community

Where developers are discussing it

Posts on Hacker News, dev.to and Lobsters that link to this repository, found by our scan of those communities. 1 in the last 30 days; newest first.

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/cloudflare-cloudflare-docs.svg)](https://hysenlabs.com/projects/cloudflare-cloudflare-docs)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/cloudflare-cloudflare-docs.svg)](https://hysenlabs.com/projects/cloudflare-cloudflare-docs)

Was this useful?