Skip to content

Commit 082cf9c

Browse files
committed
First draft of contributing with Volto submodules.
Move existing "Managing contributions on GitHub" section after "Contributor Roles" section
1 parent 1015bd4 commit 082cf9c

File tree

2 files changed

+180
-23
lines changed

2 files changed

+180
-23
lines changed

docs/_static/edit-pencil-icon.png

9.6 KB
Loading

docs/contributing/index.md

Lines changed: 180 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ html_meta:
88

99
# Contributing to Plone Documentation
1010

11-
This document describes how to contribute to the Plone Documentation.
11+
This document describes how to contribute to Plone Documentation.
1212

1313
Contributions to the Plone Documentation are welcome.
1414

@@ -31,17 +31,43 @@ The Plone Documentation is licensed under the [Creative Commons Attribution 4.0
3131
A copy of the license is included in the root of this repository.
3232

3333

34+
(contributing-roles-label)=
35+
36+
## Contributor Roles
37+
38+
Contributors to the Plone Documentation may perform one or many roles.
39+
40+
- **Plone users and developers** use this documentation because it is accurate and actively maintained.
41+
People in these roles typically contribute minor corrections.
42+
They should read {doc}`setup-build` and {doc}`writing-docs-guide`.
43+
- **Authors** create Plone Documentation.
44+
They should read {doc}`setup-build` and {doc}`writing-docs-guide`.
45+
They should also read {doc}`authors` for guidance and tips for writing good technical documentation.
46+
47+
48+
(contributing-quality-requirements-label)=
49+
50+
## Documentation quality requirements
51+
52+
We use GitHub Actions with every pull request to enforce Plone Documentation quality.
53+
We recommend that you build the documentation locally to catch errors and warnings early on.
54+
See {doc}`setup-build` for instructions for how to set up and build the documentation and to run quality checks.
55+
56+
3457
(contributing-manage-on-github-label)=
3558

36-
## Managing contributions on GitHub
59+
## Making contributions on GitHub
60+
61+
Contributions are managed through git repositories on GitHub.
3762

38-
Contributions are managed through the [Documentation repository on GitHub](https://github.com/plone/documentation).
63+
- [documentation](https://github.com/plone/documentation)
64+
- [volto](https://github.com/plone/volto)
3965

4066
First discuss whether you should perform any work.
4167
Any method below is acceptable, but are listed in order of most likely to get a response.
4268

43-
- [Search for open issues](https://github.com/plone/documentation/issues) and comment on them.
44-
- [Create a new issue](https://github.com/plone/documentation/issues/new/choose).
69+
- Search for open issues in [`documentation`](https://github.com/plone/documentation/issues) or [`volto`](https://github.com/plone/volto/issues) and comment on them.
70+
- Create a new issue in [`documentation`](https://github.com/plone/documentation/issues/new/choose) or [`volto`](https://github.com/plone/documentation/volto/new/choose).
4571
- Discuss during conferences, trainings, and other Plone events.
4672
- Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13).
4773
- Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj).
@@ -53,35 +79,166 @@ Tap, click, or hover over the GitHub Octocat icon for options.
5379
:alt: GitHub navigation menu
5480
```
5581

56-
You can use this menu to quickly navigate to the source repository, open an issue, or suggest an edit to the current document.
57-
Of course, you can use whichever tools you like.
82+
You can use this menu to quickly navigate to the `documentation` source repository, open an issue, or suggest an edit to the current document.
83+
Note that this navigation convenience is provided only for the `documentation` repository.
5884

59-
Next edit files, commit your changes, push them to the remote repository, and submit a pull request to resolve the issue.
6085

61-
Members who subscribe to the repository will receive a notification and review your request.
86+
(contributing-quick-edits-label)=
6287

88+
### Quick edits
6389

64-
(contributing-roles-label)=
90+
Quick edits for minor issues, such as typographical errors, misspellings, and English grammar and syntax, can be made through the GitHub user interface.
6591

66-
## Contributor Roles
92+
1. Navigate to the repository as noted in {ref}`contributing-manage-on-github-label`.
93+
1. Navigate with the `docs` directory to find the source file to edit.
94+
1. Click the {guilabel}`pencil icon` to edit the file in the browser.
6795

68-
Contributors to the Plone Documentation may perform one or many roles.
96+
```{image} /_static/edit-pencil-icon.png
97+
:alt: GitHub Edit this file
98+
```
99+
1. Make edits, add a commit message, select {guilabel}`Create a **new branch** for this commit and start a pull request`, then click {guilabel}`Propose changes`.
100+
1. Make your pull request against the branch `6-dev`.
101+
1. Members who subscribe to the repository will receive a notification and review your request.
69102
70-
- **Plone users and developers** use this documentation because it is accurate and actively maintained.
71-
People in these roles typically contribute minor corrections.
72-
They should read {doc}`setup-build` and {doc}`writing-docs-guide`.
73-
- **Authors** create Plone Documentation.
74-
They should read {doc}`setup-build` and {doc}`writing-docs-guide`.
75-
They should also read {doc}`authors` for guidance and tips for writing good technical documentation.
76103
104+
(contributing-large-edits-label)=
77105
78-
(contributing-quality-requirements-label)=
106+
### Large edits
79107
80-
## Documentation quality requirements
108+
For large edits, first follow the instructions in {doc}`setup-build`.
109+
110+
Once you have your environment set up, then you can follow the standard practice for making a pull request.
111+
This practice differs depending on whether you are making contributions to only the core `documentation` files or `volto` files as well.
112+
113+
114+
(contributing-documentation-only-label)=
115+
116+
### Working with only the `documentation` repository
117+
118+
This section describes how to make contributions to files in the `documentation` repository only, and excludes `volto` files.
119+
120+
1. From the project root directory, synch your local `6-dev` branch with its remote.
121+
You might need to resolve conflicts.
122+
123+
```shell
124+
git checkout 6-dev
125+
git pull
126+
```
127+
128+
1. Create a new branch from `6-dev`.
129+
130+
```shell
131+
git checkout -b <new_branch>
132+
```
133+
134+
1. Edit files, save, preview, and test.
135+
You must run and pass the builds `html` and `linkcheck` without causing new errors.
136+
137+
```shell
138+
# Optionally clean the builds to avoid cache issues
139+
make clean
140+
make html
141+
make linkcheck
142+
```
143+
144+
```{note}
145+
Currently there are some errors on the `html` build, mostly due to empty `meta` HTML tags.
146+
You are welcome to fix as many errors as you like.
147+
You are only responsible to fix errors that you create.
148+
```
149+
150+
```{note}
151+
Eventually the `spellcheck` build will be required, but not at this time.
152+
We welcome improvements to the dictionary.
153+
```
154+
155+
```{seealso}
156+
{ref}`setup-build-available-documentation-builds-label`.
157+
```
158+
159+
1. After the builds pass, commit changes to your branch, and push it to the remote repository on GitHub.
160+
The remote repository may be either a branch in your fork of the project or a branch in the `plone/documentation` upstream repository.
161+
162+
```shell
163+
git commit -m "My descriptive commit message"
164+
git push
165+
```
166+
167+
1. Visit the GitHub `documentation` repository, and [create a pull request](https://github.com/plone/documentation/compare) against the branch `6-dev`.
168+
1. Members who subscribe to the repository will receive a notification and review your request.
169+
170+
171+
(contributing-documentation-and-volto-label)=
172+
173+
### Working with both the `documentation` and `volto` repositories
174+
175+
When you want to edit files within the `docs/volto` subdirectory, the process is slightly different.
176+
We use git submodules to manage multiple repositories.
177+
We imported the `volto` repository into the `documentation` repository as described in {doc}`setup-build`.
178+
179+
```{important}
180+
We currently use the branches `plone/documentation@6-dev` and `plone/volto@plone6-docs` as the main branches for developing Plnoe 6 Documentation.
181+
These branches may change as we get closer to a production release.
182+
```
183+
184+
1. From the project root directory, synch your local `6-dev` branch with its remote.
185+
You might need to resolve conflicts.
186+
187+
```shell
188+
git checkout 6-dev
189+
git pull
190+
```
191+
192+
1. Change your working directory from the project root directory to `submodules/volto`.
193+
194+
```shell
195+
cd submodules/volto
196+
```
197+
198+
1. Update the submodule, and synch your local `plone6-docs` branch with its remote.
199+
You might need to resolve conflicts.
200+
201+
```shell
202+
git submodule update
203+
git checkout plone6-docs
204+
git pull
205+
```
206+
207+
1. Create a new branch from `volto/plone6-docs`.
208+
209+
```shell
210+
git checkout -b <new_branch>
211+
```
212+
213+
1. Make edits to files in `docs/volto` using your favorite editor, and save, preview, and test.
214+
You must run and pass the builds `html` and `linkcheck` without causing new errors.
215+
216+
```shell
217+
# Optionally clean the builds to avoid cache issues
218+
make clean
219+
make html
220+
make linkcheck
221+
```
222+
223+
1. Back in `submodules/volto`, commit your changes.
224+
225+
```shell
226+
git add <files>
227+
git commit -m "My commit message"
228+
```
229+
230+
1. Now return to the project root directory, and update the submodule to point to the commit you just made, and push your changes to the remote repository.
231+
232+
```shell
233+
cd ../..
234+
git add submodules/volto
235+
git commit -m "Update submodules/volto tip"
236+
git push
237+
```
238+
239+
1. Visit the GitHub `volto` repository, and [create a pull request](https://github.com/plone/volto/compare) against the branch `plone6-docs`.
240+
1. Members who subscribe to the repository will receive a notification and review your request.
81241

82-
We use GitHub Actions with every pull request to enforce Plone Documentation quality.
83-
We recommend that you build the documentation locally to catch errors and warnings early on.
84-
See {doc}`setup-build` for instructions for how to set up and build the documentation and to run quality checks.
85242

86243

87244
(contributing-code-of-conduct-label)=

0 commit comments

Comments
 (0)