/cloudflare-docs

Cloudflare’s documentation

Primary LanguageCSSCreative Commons Attribution 4.0 InternationalCC-BY-4.0

Cloudflare Docs

View the docs →

Contribute to the docs

Setup

You must have Hugo installed on your system and available in your $PATH as a global binary. Most operating systems are supported – follow the relevant installation instructions for your operating system to get started.

Important: This project is built with version 0.123.5+extended and is the minimum required version. You may (probably) use a newer version of Hugo, but will be subject to any Hugo changes.

You must also have a recent version of Node.js (18+) installed. You may use Volta, a Node version manager, to install the latest version of Node and npm, which is a package manager that is included with node's installation.

$ curl https://get.volta.sh | bash
$ volta install node

Finally, install the Node.js dependencies for this project using npm or another package manager:

$ npm install

Development

When making changes to the site, including any content changes, you may run a local development server by running the following command:

$ npm run dev

This spawns a server that will be accessible via http://localhost:5173 in your browser. Additionally, any changes made within the project – including content/** changes – will automatically reload your browser tab(s), allowing you to instantly preview your changes.

Additionally, this project includes a CI step for ensuring consistent code style. This applies to all files within the project, including markdown (*.md) files, but will not affect the content itself or the content's output display. To see the style error(s), you may run:

$ npm run lint

Recommendations

Part of our application accesses the GitHub API (to populate the Wrangler changelog).

Since GitHub gives a higher request limit to authenticated requests, you may want to add a classic token with permissions for repos:public_repo to /assets/secrets/github_token.txt. The token value should be the only thing in your file.

Deployment

Our docs are deployed using Cloudflare Pages. Every commit pushed to production will automatically deploy to developers.cloudflare.com, and any pull requests opened will have a corresponding staging URL available in the pull request comments.

Available Visual Studio Code snippets

Refer to Visual Studio Code snippets for more information.

For Cloudflare employees

To get write access to this repo, please reach out to the Developer Docs room in chat.

License and Legal Notices

Except as otherwise noted, Cloudflare and any contributors grant you a license to the Cloudflare Developer Documentation and other content in this repository under the Creative Commons Attribution 4.0 International Public License, see the LICENSE file, and grant you a license to any code in the repository under the MIT License, see the LICENSE-CODE file.

Cloudflare products and services referenced in the documentation may be either trademarks or registered trademarks of Cloudflare in the United States and/or other countries. The licenses for this project do not grant you rights to use any Cloudflare names, logos, or trademarks. Cloudflare's general trademark guidelines can be found at https://www.cloudflare.com/trademark/. Cloudflare and any contributors reserve all other rights, whether under their respective copyrights, patents, or trademarks, whether by implication, estoppel, or otherwise.