Skip to content

Commit b2ec254

Browse files
authored
Merge pull request plone#1478 from plone/contributing-plone-core-code
Create Plone Core Code contributing documentation
2 parents 7d4df0a + e7a1520 commit b2ec254

File tree

9 files changed

+590
-262
lines changed

9 files changed

+590
-262
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
r"http://yoursite",
8181
r"https://www.linode.com",
8282
r"https://vhs-ehrenamtsportal.de", # SSLError(SSLCertVerificationError
83-
r"https://github.com/orgs/plone/teams/developers", # requires auth
83+
r"https://github.com/orgs/plone/teams/", # requires auth
8484
r"https://github.com/plone/documentation/issues/new/choose", # requires auth
8585
# Ignore specific anchors
8686
r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue",
File renamed without changes.
File renamed without changes.
Lines changed: 321 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,321 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Contributing to Plone 6 Documentation"
5+
"property=og:description": "Contributing to Plone 6 Documentation"
6+
"property=og:title": "Contributing to Plone 6 Documentation"
7+
"keywords": "Plone, Plone Contributor Agreement, License, Code of Conduct"
8+
---
9+
10+
(contributing-documentation-index-label)=
11+
12+
# Contributing to documentation
13+
14+
This document describes how to contribute to Plone Documentation.
15+
16+
Contributions to the Plone Documentation are welcome.
17+
18+
19+
(contributing-permission-to-publish-label)=
20+
21+
## Granting permission to publish
22+
23+
Before you contribute, you must give permission to publish your contribution according to the license we use.
24+
You may give that permission in two ways.
25+
26+
- Sign the [Plone Contributor Agreement](https://plone.org/foundation/contributors-agreement).
27+
This method also covers contributions to Plone code.
28+
It is a one-time only process.
29+
- In every pull request or commit message, include the following statement.
30+
31+
> I, [full name], agree to have this contribution published under Creative Commons 4.0 International License (CC BY 4.0), with attribution to the Plone Foundation.
32+
33+
The Plone Documentation is licensed under the [Creative Commons Attribution 4.0 International License (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/).
34+
A copy of the license is included in the root of this repository.
35+
36+
37+
(contributing-roles-label)=
38+
39+
## Contributor roles
40+
41+
Contributors to the Plone Documentation may perform one or many roles.
42+
43+
- **Plone users and developers** use this documentation because it is accurate and actively maintained.
44+
People in these roles typically contribute minor corrections.
45+
They should read {doc}`setup-build` and {doc}`myst-reference`.
46+
- **Authors** create Plone Documentation.
47+
They should read {doc}`setup-build` and {doc}`myst-reference`.
48+
They should also read {doc}`authors` for guidance and tips for writing good technical documentation.
49+
50+
51+
(contributing-quality-requirements-label)=
52+
53+
## Documentation quality requirements
54+
55+
We use GitHub Actions with every pull request to enforce Plone Documentation quality.
56+
We recommend that you build the documentation locally to catch errors and warnings early on.
57+
See {doc}`setup-build` for instructions for how to set up and build the documentation and to run quality checks.
58+
59+
60+
(contributing-manage-on-github-label)=
61+
62+
## Making contributions on GitHub
63+
64+
Contributions are managed through git repositories on GitHub.
65+
66+
- [`documentation`](https://github.com/plone/documentation)
67+
- [`plone.api`](https://github.com/plone/plone.api)
68+
- [`plone.restapi`](https://github.com/plone/plone.restapi)
69+
- [`volto`](https://github.com/plone/volto)
70+
71+
In the Plone organization, it is strongly recommended that you read {ref}`contributing-permission-to-publish-label` and take appropriate action.
72+
73+
After your Plone Contributor Agreement has been approved, and you have been added to the Plone GitHub organization as a member of the [Developers](https://github.com/orgs/plone/teams/developers) team, we recommend that you follow our guidelines.
74+
75+
1. Discuss whether you should perform any work.
76+
Any method below is acceptable, but are listed in order of most likely to get a response.
77+
78+
- Search for open issues in the issue trackers of documented projects, and comment on them.
79+
If an issue does not already exist for what you want to work on, then create a new issue in its issue tracker.
80+
81+
As a convenience, at the top right of every page, there is a GitHub navigation menu.
82+
Tap, click, or hover over the GitHub Octocat icon for options.
83+
84+
```{image} /_static/github-navigation.png
85+
:alt: GitHub navigation menu
86+
```
87+
88+
You can use this menu to quickly navigate to the `documentation` source repository or open an issue.
89+
Note that this navigation convenience is provided only for the `documentation` repository.
90+
91+
- [`documentation`](https://github.com/plone/documentation/issues)
92+
- [`plone.api`](https://github.com/plone/plone.api/issues)
93+
- [`plone.restapi`](https://github.com/plone/plone.restapi/issues)
94+
- [`volto`](https://github.com/plone/volto/issues)
95+
96+
- Discuss during sprints, conferences, trainings, and other Plone events.
97+
- Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13).
98+
- Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj).
99+
100+
1. For first-time contributors especially, **you do not need to ask to be assigned to, or to work on, an open issue**.
101+
As in any open source project, you can start work on open issues at your convenience.
102+
103+
```{tip}
104+
Working on documentation or on issues labeled with either `33 needs: docs` or `41 lvl: easy` are the two best ways for first-timers to contribute.
105+
This is because first-timers have a fresh perspective that might be overlooked by old-timers.
106+
```
107+
108+
1. Clarify the scope of work that needs to be done.
109+
Check for previous work, assignment to another developer, or whether the requirements have changed.
110+
1. [Assign yourself to the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users).
111+
This signals to other developers that you are working on the issue.
112+
113+
From here, you can either make {ref}`contributing-quick-edits-label` or {ref}`contributing-large-edits-label`.
114+
115+
116+
(contributing-quick-edits-label)=
117+
118+
### Quick edits
119+
120+
Quick edits for minor issues, such as typographical errors, misspellings, and English grammar and syntax, can be made through the GitHub user interface.
121+
122+
1. Navigate to the repository as noted in {ref}`contributing-manage-on-github-label`.
123+
1. Navigate with the `docs` directory to find the source file to edit.
124+
1. Click the {guilabel}`pencil icon` to edit the file in the browser.
125+
126+
```{image} /_static/edit-pencil-icon.png
127+
:alt: GitHub Edit this file
128+
```
129+
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`.
130+
1. Make your pull request against the branch `6-dev`.
131+
1. Members who subscribe to the repository will receive a notification and review your request.
132+
1. Request a review from other team members.
133+
134+
135+
(contributing-large-edits-label)=
136+
137+
### Large edits
138+
139+
For large edits, first follow the instructions in {doc}`setup-build`.
140+
141+
Once you have your environment set up, then you can follow the standard practice for making a pull request.
142+
This practice differs depending on whether you are making contributions to only the core `documentation` files, or `plone.api`, `plone.restapi` and `volto` files as well.
143+
144+
145+
(contributing-documentation-only-label)=
146+
147+
### Working with only the `plone/documentation` repository
148+
149+
This section describes how to make contributions to files in the `plone/documentation` repository only, and excludes files in `submodules/plone.api/docs`, `submodules/plone.restapi/docs` and `submodules/volto/docs`.
150+
151+
1. From the project root directory, sync your local `6-dev` branch with its remote.
152+
You might need to resolve conflicts.
153+
154+
```shell
155+
git checkout 6-dev
156+
git pull
157+
```
158+
159+
1. Create a new branch from `6-dev`.
160+
161+
```shell
162+
git checkout -b <new_branch>
163+
```
164+
165+
1. Edit files, save, preview, and test.
166+
You must run and pass the builds `html` and `linkcheck` without causing new errors.
167+
168+
```shell
169+
# Optionally clean the builds to avoid cache issues
170+
make clean
171+
make html
172+
make linkcheck
173+
```
174+
175+
```{note}
176+
Currently there are some errors on the `html` build, mostly due to empty `meta` HTML tags.
177+
You are welcome to fix as many errors as you like.
178+
You are only responsible to fix errors that you create.
179+
```
180+
181+
```{note}
182+
Eventually the `vale` build will be required, but not at this time.
183+
We welcome improvements to the dictionary.
184+
```
185+
186+
```{seealso}
187+
{ref}`setup-build-available-documentation-builds-label`.
188+
```
189+
190+
1. After the builds pass, commit changes to your branch, and push it to the remote repository on GitHub.
191+
The remote repository may be either a branch in your fork of the project or a branch in the `plone/documentation` upstream repository.
192+
193+
```shell
194+
git commit -m "My descriptive commit message"
195+
git push
196+
```
197+
198+
1. Visit the GitHub `documentation` repository, and [create a pull request](https://github.com/plone/documentation/compare) against the branch `6-dev`.
199+
1. Members who subscribe to the repository will receive a notification and review your request.
200+
1. Request a review from other team members.
201+
202+
203+
(contributing-editing-external-package-documentation-label)=
204+
205+
### Editing external package documentation
206+
207+
If you want to edit documentation of imported external packages, the process is slightly different.
208+
We use `git submodules` to manage multiple repositories.
209+
We imported the external repositories the `plone/documentation` repository as described in {doc}`setup-build`.
210+
211+
```{important}
212+
We currently use the branches `plone/documentation@6-dev`, `plone/plone.api@master`, `plone/plone.restapi@master`, and `plone/volto@master` as the main branches for developing Plone 6 Documentation.
213+
These branches may change as we get closer to a production release.
214+
```
215+
216+
1. From the project root directory, sync your local `6-dev` branch with its remote.
217+
You might need to resolve conflicts.
218+
219+
```shell
220+
git checkout 6-dev
221+
git pull
222+
```
223+
224+
1. Change your working directory to the imported package's directory under `submodules/`.
225+
226+
```shell
227+
# Choose one.
228+
cd submodules/plone.api
229+
cd submodules/plone.restapi
230+
cd submodules/volto
231+
```
232+
233+
1. Update the submodule, and sync your local development branch with its remote.
234+
You might need to resolve conflicts.
235+
236+
```shell
237+
git submodule update
238+
239+
# for plone.api
240+
git checkout master
241+
242+
# for plone.restapi
243+
git checkout master
244+
245+
# for volto
246+
git checkout master
247+
248+
git pull
249+
```
250+
251+
1. Create a new branch from the development branch.
252+
253+
```shell
254+
git checkout -b <new_branch>
255+
```
256+
257+
1. Make edits to files in `docs/<external_package>` using your favorite editor, and save, preview, and test.
258+
You must run and pass the builds `html` and `linkcheck` without causing new errors.
259+
260+
```shell
261+
# Optionally clean the builds to avoid cache issues.
262+
# Note that for the external packages' documentation only,
263+
# we use "docs-" as a prefix for make targets to avoid a conflicts.
264+
make docs-clean
265+
make docs-html
266+
make docs-linkcheck
267+
```
268+
269+
1. Back in `submodules/<external_package>`, commit and push your changes to the remote.
270+
271+
```shell
272+
git add <files>
273+
git commit -m "My commit message"
274+
git push
275+
```
276+
277+
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.
278+
279+
```shell
280+
cd ../..
281+
282+
# for plone.api
283+
git add submodules/plone.api
284+
git commit -m "Update submodules/plone.api tip"
285+
286+
# for plone.restapi
287+
git add submodules/plone.restapi
288+
git commit -m "Update submodules/plone.restapi tip"
289+
290+
# for Volto
291+
git add submodules/volto
292+
git commit -m "Update submodules/volto tip"
293+
294+
git push
295+
```
296+
297+
1. Visit the GitHub `plone/<external_package>` repository, and create a pull request against the development branch.
298+
1. Members who subscribe to the `plone/<external_package>` repository will receive a notification and review your request.
299+
1. Request a review from other team members.
300+
301+
302+
(contributing-documentation-code-of-conduct-label)=
303+
304+
## Code of Conduct
305+
306+
See {ref}`contributing-code-of-conduct-label`.
307+
308+
309+
```{toctree}
310+
---
311+
caption: Contributing to Documentation
312+
maxdepth: 2
313+
hidden: true
314+
---
315+
316+
setup-build
317+
authors
318+
myst-reference
319+
sphinx-extensions
320+
admins
321+
```

docs/contributing/myst-reference.md renamed to docs/contributing/documentation/myst-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ Official MyST documentation
4848
#### Link to a chapter or page
4949

5050
```md
51-
Here is how to set up and build the documentation locally {doc}`/contributing/setup-build`.
51+
Here is how to set up and build the documentation locally {doc}`/contributing/documentation/setup-build`.
5252
```
5353

54-
Here is how to set up and build the documentation locally {doc}`/contributing/setup-build`.
54+
Here is how to set up and build the documentation locally {doc}`/contributing/documentation/setup-build`.
5555

5656

5757
(myst-reference-link-heading-label)=
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)