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
chore: Update repo README and CONTRIBUTING section (#1439)
* Update README.md
* Update CONTRIBUTING section
Add more details about where to make changes, apply-patch script, and creating a new release
* Update pull_request_template.md
* Fix typo
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,10 @@ Please fill in this template:
18
18
Select one of these and delete the others:
19
19
20
20
If updating the documentation for the most recent release of k6:
21
-
-[ ] I have made my changes in the `docs/sources/v{most_recent_release}` folder of the documentation.
22
-
-[ ] I have reflected my changes in the `docs/sources/next` folder of the documentation.
21
+
-[ ] I have made my changes in the `docs/sources/next` folder of the documentation.
22
+
-[ ] I have reflected my changes in the `docs/sources/v{most_recent_release}` folder of the documentation.
23
23
-[ ] I have reflected my changes in the relevant (*e.g.* when correcting a documentation error) folders of the previous k6 versions of the documentation.
24
+
<!-- You can use the scripts/apply-patch scripts to help you port changes from one version folder to another. For more details, refer to [Use the `apply-patch` script](../CONTRIBUTING/README.md#use-the-apply-patch-script). -->
24
25
25
26
If updating the documentation for the next release of k6:
26
27
-[ ] I have made my changes in the `docs/sources/next` folder of the documentation.
Copy file name to clipboardExpand all lines: CONTRIBUTING/README.md
+71-5Lines changed: 71 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,14 @@ When you contribute to the docs, it helps to know how things work.
10
10
-[Before you begin](#before-you-begin)
11
11
-[Build and preview](#build-and-preview)
12
12
-[Write](#write)
13
+
-[Where to make updates](#where-to-make-updates)
14
+
- [Updates and fixes to the latest version of k6](#updates-and-fixes-to-the-latest-version-of-k6)
15
+
- [Updates and fixes to the next major release of k6](#updates-and-fixes-to-the-next-major-release-of-k6)
16
+
-[Use the `apply-patch` script](#use-the-apply-patch-script)
13
17
-[Style Guides](#style-guides)
14
18
-[Shortcodes](#shortcodes)
15
19
-[Deploy](#deploy)
16
-
-[Upgrade a main release](#upgrade-a-main-release)
20
+
-[Create a new release](#create-a-new-release)
17
21
18
22
<!-- markdown-toc end -->
19
23
@@ -23,6 +27,7 @@ For writers, these are the most important directories:
23
27
24
28
-[`docs/sources`](../docs/sources) is where the docs live.
25
29
-`docs/sources/VERSION/shared` has Markdown files that can be reused across multiple pages by using the [`shared` shortcode](https://grafana.com/docs/writers-toolkit/write/shortcodes/#docsshared).
30
+
-`src/data/markdown` contains the Markdown files for the legacy version of the docs, available at https://k6.io/docs. **You do not need to update these files if you're making changes to the current or next version of the docs, available at https://grafana.com/docs/k6/latest/**.
26
31
27
32
## Build locally
28
33
@@ -72,6 +77,55 @@ description: <summary text for search engines and social shares. Aim for 170 cha
72
77
---
73
78
```
74
79
80
+
You can find the Markdown file for the docs in the [`docs/sources`](../docs/sources) folder. In that folder you'll find:
81
+
82
+
- A `next` folder, which represents the docs for the next major release of k6.
83
+
- Multiple version folders (for example, v0.47.x), which represents the docs for that specific version of k6.
84
+
85
+
Depending on the type of update you need to make, you'll want to make updates to different folders.
86
+
87
+
### Where to make updates
88
+
89
+
#### Updates and fixes to the latest version of k6
90
+
91
+
If you're making any updates or fixes that apply to the latest version of k6, you'll need to:
92
+
93
+
- Update the Markdown files in the `docs/sources/next` folder.
94
+
- Update the Markdown files in the `docs/sources/v{LATEST_VERSION}` folder.
95
+
- You can do this manually or by using the [`apply-patch`](../scripts/apply-patch) script from the `scripts` folder. Refer to the [Use the `apply-patch` script](#use-the-apply-patch-script) section for more details.
96
+
97
+
This is to make sure that any changes you make are also brought over to the next major release version of k6.
98
+
99
+
#### Updates and fixes to the next major release of k6
100
+
101
+
If you're making any updates or fixes that only apply to the next major release of k6, you'll need to:
102
+
103
+
- Update the Markdown files in the `docs/sources/next` folder.
104
+
105
+
Once you make any changes and open a PR, and that PR is reviewed, you can merge it without having to worry about those changes showing up in the `latest` version of the docs. The `latest` version will always display the highest numbered version folder of the docs.
106
+
107
+
### Use the `apply-patch` script
108
+
109
+
You can use the `apply-patch script` to port changes from one version folder to another. This is especially helpful if you're making updates or fixes to the latest version of k6, and want to make sure they're also reflected in the `next` version folder.
110
+
111
+
To use the script, make sure you're in the root of the k6-docs folder and run:
112
+
113
+
```bash
114
+
scripts/apply-patch <COMMIT><SOURCE><DESTINATION>
115
+
```
116
+
117
+
For example, if you'd like to apply the changes from your last commit, from the `docs/sources/next` folder to the `docs/sources/v0.47.x`, you can run:
- k6 follows the style prescribed in the [Grafana Writers' Toolkit](https://grafana.com/docs/writers-toolkit/), which itself inherits most of its rules from the [Google developer documentation style guide](https://developers.google.com/style).
@@ -86,10 +140,22 @@ Refer to [Writers' Toolkit, Write documentation](https://grafana.com/docs/writer
86
140
87
141
Once a PR is merged to the main branch, if there are any changes made to the `docs/sources` folder, the GitHub Action [`publish-technical-documentation.yml`](https://github.com/grafana/k6-docs/blob/main/.github/workflows/publish-technical-documentation.yml) will sync the changes with the grafana/website repository, and the changes will be deployed to production soon after.
88
142
89
-
### Upgrade a main release
143
+
##Create a new release
90
144
91
-
> ####⚠️ Versions
145
+
> ### ⚠️ Versions
92
146
>
93
-
> Versions follow the same major and minor numbers as github.com/grafana/k6.
147
+
> Versions follow the same major numbers as github.com/grafana/k6.
148
+
149
+
When a new major version of k6 is released, you need to create a new folder for it in the [`docs/sources`](../docs/sources) folder.
150
+
151
+
The process for creating a new release should be:
152
+
153
+
- Review any open PRs that relate to the next major release, and merge them if they have been reviewed and approved.
154
+
-`git pull` the latest version of the k6-docs repository.
155
+
- In the `docs/sources` folder:
156
+
- Duplicate the `next` folder.
157
+
- Rename the `next copy` folder to match the next major release version. For example, if the next release is `v0.48`, the folder should be renamed to `v0.48.x`.
158
+
- Build the docs locally to check that the latest version matches the new version folder.
159
+
- Commit and push your changes.
94
160
95
-
TODO: Add step-by-step instructions for creating a new major version release.
161
+
Once your changes are automatically deployed, you should be able to see the new version live by going to https://grafana.com/docs/k6/latest/.
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Some key facts:
12
12
- The docs are written in Markdown and built with Hugo.
13
13
- The [Contributor's guide](./CONTRIBUTING) has meta-documentation about building locally, using special components and styling, deploying, troubleshooting, and more.
14
14
- We have a [Code of conduct](https://github.com/grafana/k6-docs/blob/main/CODE_OF_CONDUCT.md).
15
+
- We follow the Grafana Style Guide, and you can find more information about it in the [Writers' Toolkit](https://grafana.com/docs/writers-toolkit/).
15
16
16
17
## Contributing
17
18
@@ -24,13 +25,15 @@ Markdown files for the documentation are located in the [`docs/sources/`](docs/s
24
25
25
26
For small changes and spelling fixes, the GitHub UI is the most convenient way to contribute.
26
27
For larger contributions, consider running the project locally to see how the changes look like before making a pull request.
27
-
28
+
28
29
The following docs cover the different stages of the writing workflow:
29
30
30
31
-[Local development](#local-development). For any large changes, being able to see a preview of the site can help make sure things are rendered correctly, and spot any issues before they're deployed to production.
31
32
-[Writers' Toolkit](https://grafana.com/docs/writers-toolkit/). Learn more about the Grafana writing style guide, front matter properties, how to upload and add images, and much more.
32
33
-[Preview and deploy](./CONTRIBUTING#deploy). Changes made to the files inside of `docs/sources` are automatically deployed to production once they're merged to the main branch.
33
34
35
+
For more details, refer to the [CONTRIBUTING](./CONTRIBUTING/README.md) section.
36
+
34
37
## Local development
35
38
36
39
### Before you begin
@@ -64,4 +67,4 @@ View documentation locally:
64
67
Press Ctrl+C to stop the server
65
68
```
66
69
67
-
Go to http://localhost:3002/docs/k6/, and you should be able to see a preview of the docs.
70
+
Go to http://localhost:3002/docs/k6/, and you should be able to see a preview of the docs.
0 commit comments