-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Style guide] Contributing guide #24666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9ad755c
[Style guide] Contributing guide
ToriLindsay cc71eae
Updates - Denise suggestions
ToriLindsay 6ea8892
Update file name
ToriLindsay b2ac047
More feedback updates
ToriLindsay aa7f4a1
Delete image
ToriLindsay 18a56ba
Consolidated full development workflow
ToriLindsay b555628
slight tweaks
ToriLindsay aaec31b
preview note
ToriLindsay 0e108a4
Added codeblock - consolidated links - slight tweaks
ToriLindsay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: Contributions | ||
| description: | | ||
| sidebar: | ||
| order: 1 | ||
| --- | ||
| import { Details } from "~/components"; | ||
|
|
||
| The [Cloudflare Docs](https://developers.cloudflare.com/) are open source and hosted on the [cloudflare-docs repository](https://github.com/cloudflare/cloudflare-docs) on GitHub. This means that anyone, including those who are not part of the Cloudflare organization, can contribute to them. We welcome all suggestions that help keep our docs high quality and up to date. | ||
|
|
||
| To contribute to our docs, you will need to [create an account on GitHub](https://docs.github.com/en/get-started/start-your-journey/creating-an-account-on-github) (if you do not have one already) and log in. Then you have three options: | ||
| * [GitHub issue](#create-a-github-issue): Quickly submit a general suggestion. | ||
| * [Quick edit (edit button)](#quick-edit): Quickly create a pull request. This is best if you want to edit a single page in your web browser, and do not need to preview your changes. | ||
| * [Full development](#full-development): Create a pull request. This is best if you want to edit multiple pages and preview your changes. This can be done in your web browser (with [Codespaces](https://docs.github.com/codespaces)) or on your local machine (with [Visual Studio Code](https://code.visualstudio.com/)). | ||
|
|
||
| In addition to using the [Cloudflare Style Guide](/style-guide/) for guidance on grammar and style, we recommend browsing our [components](/style-guide/components/) to add additional formatting such as [notes](/style-guide/documentation-content-strategy/component-attributes/notes-tips-warnings/) and [code blocks](/style-guide/components/code/). | ||
|
|
||
| ## Create a GitHub issue | ||
| To create a GitHub issue: | ||
| 1. [Log in to GitHub](https://github.com/login) and go to the [cloudflare-docs repository](https://github.com/cloudflare/cloudflare-docs). | ||
| 2. Select **Issues** and then **New issue**. | ||
| 3. Select the issue type, fill out the form, and select **Create**. | ||
|
|
||
| [Learn more about creating GitHub issues.](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue) | ||
|
|
||
| ## Quick edit | ||
| To quickly create a pull request using the edit button: | ||
| 1. [Log in to GitHub](https://github.com/login). | ||
| 2. Go to the page you want to edit in the [Cloudflare Docs](https://developers.cloudflare.com/) | ||
| 3. Select <Details header="**Edit** or **Edit page**">Every page in the Cloudflare Docs (including this one) has an **Edit** button on the right sidebar and an **Edit page** button on the very bottom of the page. | ||
| </Details> | ||
| The page's markdown opens. | ||
| :::note | ||
| The first time you create a pull request in the cloudflare-docs repo, you will see a GitHub landing page that says "You need to fork this repository to propose changes." Select **Fork this repository**. All of your future pull requests for cloudflare-docs will write to a new branch on your fork. | ||
| ::: | ||
| 4. Make your edits and select **Commit changes**. | ||
| 5. In the form, update the **Commit message** with the product you changed in brackets and a brief description of your changes. For example “[Images] Fixed broken link." | ||
| 6. Update the **Extended description** with more details about what you changed and why. The more details, the better. | ||
| 7. Select **Propose changes** > **Create pull request** > **Create pull request** again. | ||
|
|
||
| ## Full development | ||
ToriLindsay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| To edit and create a pull request with the full development workflow: | ||
| 1. [Log in to GitHub](https://github.com/login) and [fork the cloudflare-docs repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). | ||
| 2. If you are editing in your web browser (with [Codespaces](https://docs.github.com/en/codespaces)), move on to step 3. | ||
| <br/>If you are editing on your local machine (with [Visual Studio Code](https://code.visualstudio.com/)): | ||
| * (Required) Install [Node.js](https://nodejs.org/en) (version 22 or later). | ||
| * (Recommended, but not required) Install [Volta](https://volta.sh/) for easier package management. | ||
| * (Required) [Clone the fork to your local machine.](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) | ||
| 3. [Create a branch from your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository) (or from your clone). | ||
| 3. Make your edits. | ||
| :::note[Preview your edits] | ||
ToriLindsay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| To preview your edits, you need to install `npm`. Follow the prompts to install it or run `npm install`. Then, run `npm run dev`. A link will appear in the terminal, `https://localhost:1111/`, where you can preview your edits. This link automatically updates with any new edits you make. | ||
| ::: | ||
| 5. [Commit your changes](https://docs.github.com/en/codespaces/developing-in-a-codespace/using-source-control-in-your-codespace). | ||
| 6. [Push your commits](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository) to your branch and then back to your fork. | ||
| 7. Return to GitHub and [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) from your committed changes. In the description form, add the product you changed in brackets and a brief description of your changes. For example “[Images] Fixed broken link." | ||
|
|
||
| ## After you create an issue or PR | ||
| After you create an issue or PR, a member of the Cloudflare organization will review your suggestion. Here is what to expect: | ||
| * A member of the Cloudflare organization may tag others for technical or content reviews or feedback. | ||
| * If your suggestion requires more information, a member of the Cloudflare organization may comment with a follow-up or clarification question. If they add the `more-information-needed` tag, the issue or pull request will automatically close if you do not respond within 14 days. | ||
| * If your changes are approved: | ||
| * For GitHub issues, a Cloudflare member might create and link a new pull request that addresses your request. When they merge the PR, they will also close your issue. | ||
| * For GitHub PRs, the Cloudflare member will merge your PR. | ||
| * If your suggestion is not approved, the Cloudflare member will respond with the reasoning and close your issue or PR. | ||
|
|
||
| Thank you for contributing to our open-source ecosystem and being a part of the Cloudflare community. | ||
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.
Uh oh!
There was an error while loading. Please reload this page.