You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/style-guide/contributions.mdx
+35-30Lines changed: 35 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ description: |
4
4
sidebar:
5
5
order: 1
6
6
---
7
-
import { Steps } from"~/components"
8
7
9
8
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.
10
9
@@ -16,53 +15,60 @@ In addition to using the [Cloudflare Style Guide](/style-guide/) for guidance on
16
15
17
16
## Create a GitHub issue
18
17
To create a GitHub issue:
19
-
<Steps>
20
-
1.[Log in to GitHub](http://github.com/login) and go to the [cloudflare-docs repo](https://github.com/cloudflare/cloudflare-docs).
18
+
1.[Log in to GitHub](https://github.com/login) and go to the [cloudflare-docs repo](https://github.com/cloudflare/cloudflare-docs).
21
19
2. Select **Issues** and then **New issue**.
22
20
3. Select the issue type, fill out the form, and select **Create**.
23
-
</Steps>
24
-
[Learn more about creating GitHub Issues.](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue)
21
+
22
+
[Learn more about creating GitHub issues.](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue)
25
23
26
24
## Create a GitHub pull request
27
-
There are several method you can use to create a pull request:
25
+
There are several methods you can use to create a pull request:
28
26
***[Edit page](#edit-page)**: This is best if you only want to edit one page, only want to use your web browser, and do not need to preview your changes.
29
27
***[Create with Codespace](#create-with-codespace)**: This is best if you want to edit multiple pages, only want to use your web browser, and want to preview your changes.
30
28
***[Edit locally](#edit-locally)**: This more advanced method requires setting up a local environment. Like the Codespace method, it allows you to edit multiple pages and preview your changes.
29
+
31
30
[Learn more about creating pull requests on GitHub.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
32
31
33
32
### Edit page
34
33
To create a GitHub pull request using the edit page method:
35
-
<Steps>
36
-
1.[Log in to GitHub](http://github.com/login).
37
-
2. In the [Cloudflare Docs](https://developers.cloudflare.com/), go to the page that you want to edit and select **Edit** in the right sidebar.  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."
38
-
3. If you see this prompt, select **Fork this repository**. After you create the fork, all future pull requests for cloudflare-docs will write to a new branch in your fork. The page's markdown displays.
34
+
1.[Log in to GitHub](https://github.com/login).
35
+
2. Go to the page you want to edit in the [Cloudflare Docs](https://developers.cloudflare.com/). 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.
36
+
3. Select either **Edit** or **Edit page** on the page you want to edit.
37
+
The page's markdown opens.
38
+
:::note
39
+
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." When you see this prompt, select **Fork this repository**. After you create the fork, all future pull requests for cloudflare-docs will write to a new branch in your fork.
40
+
:::
39
41
4. Make your edits and select **Commit changes**.
40
-
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 upload-URL.mdx."
42
+
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."
41
43
6. Update the **Extended description** with more details about what you changed and why. The more details, the better.
To create a GitHub pull request using the create with Codespace method:
47
-
<Steps>
48
-
1.[Log in to GitHub](http://github.com/login) and go to the [cloudflare-docs repo](https://github.com/cloudflare/cloudflare-docs).
49
-
2. Select the **Code** dropdown > **Codespaces** tab > **Create codespace on production**. Codespace will open on the main `production` branch.
50
-
3. Make sure you are on the latest version of production. To do so, select the **Source Control** icon in the sidebar > the ellipsis next to **Changes** > **Pull**.
51
-
4. Do not make your edits on the main `production` branch. Instead, select the current branch (in this case, `production`) from the bar on the bottom of the window, type a name for your branch, and then select **Create new branch**.
48
+
1.[Log in to GitHub](https://github.com/login) and go to the [cloudflare-docs repo](https://github.com/cloudflare/cloudflare-docs).
49
+
2. Select the **Code** dropdown > **Codespaces** tab > **Create codespace on production**. A Codespace will open on the main `production` branch.
50
+
3. Make sure you are on the latest version of `production`. To do so, select the **Source Control** icon in the sidebar > the ellipsis next to **Changes** > **Pull**.
51
+
4. Select the current branch (in this case, `production`) from the bar at the bottom of the window > type a name for your new branch > **Create new branch**.
52
+
:::note
53
+
You cannot make changes on the main `production` branch.
54
+
:::
52
55
5. Select the explorer icon in the left sidebar.
53
-
6. Go to **src** > **content** > **docs** > and to locate and select the mdx file you want to edit. The page's markdown displays.
56
+
6. Go to **src** > **content** > **docs** > and locate and select the mdx file you want to edit. The page's markdown opens.
54
57
7. Make your edits.
55
-
8. To preview your changes, type `npm run dev` into the Codespace terminal. You might be prompted to install [Astro](https://astro.build/) or `npm`. If you experience errors, try using the `npm i` command to install `npm`. A link will appear in the terminal, `http://localhost:1111/`, where you can preview your changes. This link automatically updates with any new edits you make.
58
+
8. To preview your changes, type `npm run dev` into the Codespace terminal. A link will appear in the terminal, `https://localhost:1111/`, where you can preview your changes. This link automatically updates with any new edits you make.
59
+
:::note
60
+
When using `npm run dev` for the first time, follow the prompts in your terminal to install [Astro](https://astro.build/) and `npm` to your Codespace. If you are not prompted or if you are experiencing errors, install `npm` yourself with the command `npm i`.
61
+
:::
56
62
9. To stage your changes, select **Source Control** in the left sidebar and select the plus sign next to the file name under **Changes**.
57
63
10. To commit your changes, enter a commit message in the text field that briefly describes your changes, and then select **Commit** > **Publish Branch** > **origin**.
58
64
11. Return to GitHub and select **Compare & pull request** next to your pull request.
59
-
12. Update the title with the product you changed in brackets and a brief description of your changes. For example, “[Images] Fixed broken link upload-URL.mdx. For the description, add more details about what you changed and why. The more details, the better.
65
+
12. Update the title with the product you changed in brackets and a brief description of your changes. For example, “[Images] Fixed broken link." For the description, add more details about what you changed and why. The more details, the better.
60
66
13. Select **Create pull request**.
61
-
</Steps>
67
+
62
68
[Learn more about GitHub Codespaces.](https://docs.github.com/en/codespaces/quickstart)
63
69
64
70
### Edit locally
65
-
To create a GitHub pull request using the edit locally method, first setup the following local environment:
71
+
To create a GitHub pull request using the edit locally method, first set up the following local environment:
66
72
* Install Node.js (version 22 or later). We recommend that you install Node.js and `npm` with [Volta](https://volta.sh/) because Volta makes it easy to manage and switch between Node versions. Alternatively, you can [install directly from Node.js](https://nodejs.org/en).
67
73
```bash
68
74
$ curl https://get.volta.sh | bash
@@ -72,24 +78,23 @@ To create a GitHub pull request using the edit locally method, first setup the f
72
78
```bash
73
79
$ npm install
74
80
```
75
-
In addition to your project dependencies, a file called `package-lock.json` is also generated, which ensures that everyone uses the exact same dependency versions. Be sure to commit `package-lock.json` to git whenever it changes.
81
+
In addition to your project dependencies, a file called `package-lock.json` is also generated, which ensures that everyone uses the exact same dependency versions. Make sure to commit `package-lock.json` to git whenever it changes.
76
82
77
-
After setup, follow the same process as the **[create with Codespace method](#create-with-codespace)**:
78
-
<Steps>
83
+
After setup, follow the same process as the **[Codespace method](#create-with-codespace)**:
79
84
1. Pull production
80
85
2. Create a new branch
81
86
3. Stage your changes
82
87
4. Commit your changes
83
88
5. Publish the changes
84
89
6. Create your pull request on GitHub
85
-
</Steps>
86
90
87
91
## After you create an issue or PR
88
92
After you open an issue or PR, a member of the Cloudflare organization will review your suggestion. Here is what to expect:
89
-
* If your suggestion is accepted, a member of the Cloudflare organization may tag others for technical or content reviews or feedback.
90
-
* If you created an issue, a Cloudflare member might create and link a new PR that addresses your request. When they merge the PR, they will also close your issue.
91
-
* If you opened a PR, the Cloudflare member will merge your PR after it has been reviewed and approved.
93
+
* A member of the Cloudflare organization may tag others for technical or content reviews or feedback.
92
94
* 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 PR will automatically close if you do not respond within 14 days.
93
-
* If your suggestion is not accepted, the Cloudflare member will respond with the reasoning and close your issue or PR.
95
+
* If your changes are approved:
96
+
* For GitHub issues, a Cloudflare member might create and link a new PR that addresses your request. When they merge the PR, they will also close your issue.
97
+
* For GitHub PRs, the Cloudflare member will merge your PR.
98
+
* If your suggestion is not approved, the Cloudflare member will respond with the reasoning and close your issue or PR.
94
99
95
100
Thank you for contributing to our open-source ecosystem and being a part of the Cloudflare community.
0 commit comments