diff --git a/docs/conf.py b/docs/conf.py index d8ab910b5..63666a11d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,7 +80,7 @@ r"http://yoursite", r"https://www.linode.com", r"https://vhs-ehrenamtsportal.de", # SSLError(SSLCertVerificationError - r"https://github.com/orgs/plone/teams/developers", # requires auth + r"https://github.com/orgs/plone/teams/", # requires auth r"https://github.com/plone/documentation/issues/new/choose", # requires auth # Ignore specific anchors r"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors#Identifying_the_issue", diff --git a/docs/contributing/admins.md b/docs/contributing/documentation/admins.md similarity index 100% rename from docs/contributing/admins.md rename to docs/contributing/documentation/admins.md diff --git a/docs/contributing/authors.md b/docs/contributing/documentation/authors.md similarity index 100% rename from docs/contributing/authors.md rename to docs/contributing/documentation/authors.md diff --git a/docs/contributing/documentation/index.md b/docs/contributing/documentation/index.md new file mode 100644 index 000000000..3e25cf78b --- /dev/null +++ b/docs/contributing/documentation/index.md @@ -0,0 +1,321 @@ +--- +myst: + html_meta: + "description": "Contributing to Plone 6 Documentation" + "property=og:description": "Contributing to Plone 6 Documentation" + "property=og:title": "Contributing to Plone 6 Documentation" + "keywords": "Plone, Plone Contributor Agreement, License, Code of Conduct" +--- + +(contributing-documentation-index-label)= + +# Contributing to documentation + +This document describes how to contribute to Plone Documentation. + +Contributions to the Plone Documentation are welcome. + + +(contributing-permission-to-publish-label)= + +## Granting permission to publish + +Before you contribute, you must give permission to publish your contribution according to the license we use. +You may give that permission in two ways. + +- Sign the [Plone Contributor Agreement](https://plone.org/foundation/contributors-agreement). + This method also covers contributions to Plone code. + It is a one-time only process. +- In every pull request or commit message, include the following statement. + + > 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. + +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/). +A copy of the license is included in the root of this repository. + + +(contributing-roles-label)= + +## Contributor roles + +Contributors to the Plone Documentation may perform one or many roles. + +- **Plone users and developers** use this documentation because it is accurate and actively maintained. + People in these roles typically contribute minor corrections. + They should read {doc}`setup-build` and {doc}`myst-reference`. +- **Authors** create Plone Documentation. + They should read {doc}`setup-build` and {doc}`myst-reference`. + They should also read {doc}`authors` for guidance and tips for writing good technical documentation. + + +(contributing-quality-requirements-label)= + +## Documentation quality requirements + +We use GitHub Actions with every pull request to enforce Plone Documentation quality. +We recommend that you build the documentation locally to catch errors and warnings early on. +See {doc}`setup-build` for instructions for how to set up and build the documentation and to run quality checks. + + +(contributing-manage-on-github-label)= + +## Making contributions on GitHub + +Contributions are managed through git repositories on GitHub. + +- [`documentation`](https://github.com/plone/documentation) +- [`plone.api`](https://github.com/plone/plone.api) +- [`plone.restapi`](https://github.com/plone/plone.restapi) +- [`volto`](https://github.com/plone/volto) + +In the Plone organization, it is strongly recommended that you read {ref}`contributing-permission-to-publish-label` and take appropriate action. + +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. + +1. Discuss whether you should perform any work. + Any method below is acceptable, but are listed in order of most likely to get a response. + + - Search for open issues in the issue trackers of documented projects, and comment on them. + If an issue does not already exist for what you want to work on, then create a new issue in its issue tracker. + + As a convenience, at the top right of every page, there is a GitHub navigation menu. + Tap, click, or hover over the GitHub Octocat icon for options. + + ```{image} /_static/github-navigation.png + :alt: GitHub navigation menu + ``` + + You can use this menu to quickly navigate to the `documentation` source repository or open an issue. + Note that this navigation convenience is provided only for the `documentation` repository. + + - [`documentation`](https://github.com/plone/documentation/issues) + - [`plone.api`](https://github.com/plone/plone.api/issues) + - [`plone.restapi`](https://github.com/plone/plone.restapi/issues) + - [`volto`](https://github.com/plone/volto/issues) + + - Discuss during sprints, conferences, trainings, and other Plone events. + - Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13). + - Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj). + +1. For first-time contributors especially, **you do not need to ask to be assigned to, or to work on, an open issue**. + As in any open source project, you can start work on open issues at your convenience. + + ```{tip} + 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. + This is because first-timers have a fresh perspective that might be overlooked by old-timers. + ``` + +1. Clarify the scope of work that needs to be done. + Check for previous work, assignment to another developer, or whether the requirements have changed. +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). + This signals to other developers that you are working on the issue. + +From here, you can either make {ref}`contributing-quick-edits-label` or {ref}`contributing-large-edits-label`. + + +(contributing-quick-edits-label)= + +### Quick edits + +Quick edits for minor issues, such as typographical errors, misspellings, and English grammar and syntax, can be made through the GitHub user interface. + +1. Navigate to the repository as noted in {ref}`contributing-manage-on-github-label`. +1. Navigate with the `docs` directory to find the source file to edit. +1. Click the {guilabel}`pencil icon` to edit the file in the browser. + + ```{image} /_static/edit-pencil-icon.png + :alt: GitHub Edit this file + ``` +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`. +1. Make your pull request against the branch `6-dev`. +1. Members who subscribe to the repository will receive a notification and review your request. +1. Request a review from other team members. + + +(contributing-large-edits-label)= + +### Large edits + +For large edits, first follow the instructions in {doc}`setup-build`. + +Once you have your environment set up, then you can follow the standard practice for making a pull request. +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. + + +(contributing-documentation-only-label)= + +### Working with only the `plone/documentation` repository + +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`. + +1. From the project root directory, sync your local `6-dev` branch with its remote. + You might need to resolve conflicts. + + ```shell + git checkout 6-dev + git pull + ``` + +1. Create a new branch from `6-dev`. + + ```shell + git checkout -b + ``` + +1. Edit files, save, preview, and test. + You must run and pass the builds `html` and `linkcheck` without causing new errors. + + ```shell + # Optionally clean the builds to avoid cache issues + make clean + make html + make linkcheck + ``` + + ```{note} + Currently there are some errors on the `html` build, mostly due to empty `meta` HTML tags. + You are welcome to fix as many errors as you like. + You are only responsible to fix errors that you create. + ``` + + ```{note} + Eventually the `vale` build will be required, but not at this time. + We welcome improvements to the dictionary. + ``` + + ```{seealso} + {ref}`setup-build-available-documentation-builds-label`. + ``` + +1. After the builds pass, commit changes to your branch, and push it to the remote repository on GitHub. + The remote repository may be either a branch in your fork of the project or a branch in the `plone/documentation` upstream repository. + + ```shell + git commit -m "My descriptive commit message" + git push + ``` + +1. Visit the GitHub `documentation` repository, and [create a pull request](https://github.com/plone/documentation/compare) against the branch `6-dev`. +1. Members who subscribe to the repository will receive a notification and review your request. +1. Request a review from other team members. + + +(contributing-editing-external-package-documentation-label)= + +### Editing external package documentation + +If you want to edit documentation of imported external packages, the process is slightly different. +We use `git submodules` to manage multiple repositories. +We imported the external repositories the `plone/documentation` repository as described in {doc}`setup-build`. + +```{important} +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. +These branches may change as we get closer to a production release. +``` + +1. From the project root directory, sync your local `6-dev` branch with its remote. + You might need to resolve conflicts. + + ```shell + git checkout 6-dev + git pull + ``` + +1. Change your working directory to the imported package's directory under `submodules/`. + + ```shell + # Choose one. + cd submodules/plone.api + cd submodules/plone.restapi + cd submodules/volto + ``` + +1. Update the submodule, and sync your local development branch with its remote. + You might need to resolve conflicts. + + ```shell + git submodule update + + # for plone.api + git checkout master + + # for plone.restapi + git checkout master + + # for volto + git checkout master + + git pull + ``` + +1. Create a new branch from the development branch. + + ```shell + git checkout -b + ``` + +1. Make edits to files in `docs/` using your favorite editor, and save, preview, and test. + You must run and pass the builds `html` and `linkcheck` without causing new errors. + + ```shell + # Optionally clean the builds to avoid cache issues. + # Note that for the external packages' documentation only, + # we use "docs-" as a prefix for make targets to avoid a conflicts. + make docs-clean + make docs-html + make docs-linkcheck + ``` + +1. Back in `submodules/`, commit and push your changes to the remote. + + ```shell + git add + git commit -m "My commit message" + git push + ``` + +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. + + ```shell + cd ../.. + + # for plone.api + git add submodules/plone.api + git commit -m "Update submodules/plone.api tip" + + # for plone.restapi + git add submodules/plone.restapi + git commit -m "Update submodules/plone.restapi tip" + + # for Volto + git add submodules/volto + git commit -m "Update submodules/volto tip" + + git push + ``` + +1. Visit the GitHub `plone/` repository, and create a pull request against the development branch. +1. Members who subscribe to the `plone/` repository will receive a notification and review your request. +1. Request a review from other team members. + + +(contributing-documentation-code-of-conduct-label)= + +## Code of Conduct + +See {ref}`contributing-code-of-conduct-label`. + + +```{toctree} +--- +caption: Contributing to Documentation +maxdepth: 2 +hidden: true +--- + +setup-build +authors +myst-reference +sphinx-extensions +admins +``` diff --git a/docs/contributing/myst-reference.md b/docs/contributing/documentation/myst-reference.md similarity index 99% rename from docs/contributing/myst-reference.md rename to docs/contributing/documentation/myst-reference.md index 7354d4af3..73f83ebc6 100644 --- a/docs/contributing/myst-reference.md +++ b/docs/contributing/documentation/myst-reference.md @@ -48,10 +48,10 @@ Official MyST documentation #### Link to a chapter or page ```md -Here is how to set up and build the documentation locally {doc}`/contributing/setup-build`. +Here is how to set up and build the documentation locally {doc}`/contributing/documentation/setup-build`. ``` -Here is how to set up and build the documentation locally {doc}`/contributing/setup-build`. +Here is how to set up and build the documentation locally {doc}`/contributing/documentation/setup-build`. (myst-reference-link-heading-label)= diff --git a/docs/contributing/setup-build.md b/docs/contributing/documentation/setup-build.md similarity index 100% rename from docs/contributing/setup-build.md rename to docs/contributing/documentation/setup-build.md diff --git a/docs/contributing/sphinx-extensions.md b/docs/contributing/documentation/sphinx-extensions.md similarity index 100% rename from docs/contributing/sphinx-extensions.md rename to docs/contributing/documentation/sphinx-extensions.md diff --git a/docs/contributing/first-time.md b/docs/contributing/first-time.md new file mode 100644 index 000000000..22b4ec093 --- /dev/null +++ b/docs/contributing/first-time.md @@ -0,0 +1,182 @@ +--- +myst: + html_meta: + "description": "First-time contributors to Plone" + "property=og:description": "First-time contributors to Plone" + "property=og:title": "First-time contributors to Plone" + "keywords": "Plone, first-time, GitHub, contributing, contributors" +--- + +(first-time-contributors-label)= + +# First-time contributors + +This chapter provides guidance to first-time contributors to Plone and all its projects and repositories under the Plone GitHub organization. + +It is assumed that the first-time contributor has already {doc}`installed Plone <../install/index>` on their development machine, has a GitHub account, and has basic knowledge of using git and GitHub. + + +(first-time-requirements-label)= + +## Requirements + +All first-time contributors to Plone must follow the contributing requirements described in {doc}`index`. + +For [Plone Google Summer of Code (GSoC)](https://plone.org/community/gsoc) applicants, you must also follow both our and its program guidelines. + + +(contributing-make-contributions-through-github-label)= + +## Make contributions through GitHub + +Contributions to Plone are managed through git repositories on GitHub. +This section first discusses what not to do, then how to work effectively with a project on GitHub. + + +(things-not-to-do-label)= + +### Things not to do + +The following is a list of the most frequent mistakes made by first-time contributors. +Learn from their mistakes, and don't commit them yourself. + +(mistake-1-label)= + +1. **Never ask to be assigned to an issue.** + Instead you may post a comment to claim it, if no one else has claimed it (see {ref}`Avoid duplicate effort `). + For example, "I am working on this issue in pull request #123." + You do not need to ask to be assigned to, or to work on, an open issue. + As in any open source software project, you can start work on open issues at your convenience. + Privileged team members may ignore or delete comments asking to be assigned to an issue. + + (mistake-2-label)= + +2. **Avoid duplicate effort.** + Don't work on issues that have already been claimed or worked on, unless such effort has been abandoned by the author. + GitHub's interface provides links to related issues and pull requests, and who is assigned to an issue. + Pull requests will be reviewed in the order received. + Duplicate pull requests may be ignored and closed without comment by the privileged GitHub teams. + + +(plone-contributors-team-label)= + +### Plone Contributors Team + +The Plone GitHub organization uses GitHub Teams to grant groups of GitHub users appropriate access to its repositories. +New users, including GSoC applicants, are assigned to the [Contributors](https://github.com/orgs/plone/teams/contributors) Team within a few days after they have signed and returned the {ref}`Plone Contributor Agreement `. +New contributors should wait for confirmation that they have been added to this team before creating a pull request to a Plone project. + + +(first-time-mr-roboto-on-github-label)= + +### `mr-roboto` on GitHub + +[`mr-roboto`](https://github.com/plone/mr.roboto) enforces the requirement of a signed Plone Contributor Agreement from a new contributor, and being assigned to a Plone team on GitHub. + +New contributors to Plone who submit a pull request and do not wait for confirmation that they have been added to the Contributors team will be subjected to persistent nagging from `mr-roboto`. +`mr-roboto` will not respond to you if you `@` it. +Core developers may ignore your contribution because you did not follow these instructions. +Please don't be "that person". + + +(work-with-github-issues-label)= + +### Work with GitHub issues + +1. **Find issues that you want to work on.** + Working on documentation or on issues labeled with either `33 needs: docs` or `41 lvl: easy` are the two best ways for first-time contributors to contribute. + This is because first-timers have a fresh perspective that might be overlooked by old-timers. +1. **Discuss whether you should perform any work.** + First see {ref}`Avoid duplicate effort `. + Next, any discussion method listed below is acceptable, and they are listed in the order of most likely to get a response. + - Search for open issues in the issue trackers of Plone projects on GitHub, and comment on them. + - If an issue does not already exist for what you want to work on, then create a new issue in its issue tracker. + Use a descriptive title and description, include steps to reproduce the issue, and screenshots or videos that demonstrate the issue. + - Discuss during sprints, conferences, trainings, and other Plone events. + - Discuss on the [Plone Community Forum](https://community.plone.org/). + - Discuss in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj). +1. **Clarify the scope of work that needs to be done.** + Sometimes the issue description is blank or lacks clarity, the requirements have changed since it was created, or work has been completed in a pull request but the issue was not closed. + Ask for clarification, whether it is still relevant, or whether it should be closed. + +After you have satisfied the above steps and have clear direction on how to proceed, then you can begin work on the issue. + + +(set-up-your-environment-label)= + +### Set up your environment + +1. Start by [forking the project's repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) to your account through the GitHub interface. +1. [Clone your forked repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#cloning-your-forked-repository). +1. [Configure git to sync your fork with the upstream repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository). + + +(write-code-label)= + +### Write code + +Once you have your environment set up, then you can follow standard best practices for working with git. + +Always start by checking out the default branch, usually `main` or `master`, then update the default branch. + +```shell +git checkout main +git pull +``` + +Then create a new branch from the default branch, and check it out to work on it. +We recommend using a branch name that includes the issue number and is descriptive of what it resolves. + +```shell +git checkout -b branch_name +``` + +Now you can edit your code without affecting the default branch. + +```{note} +The Plone organization is aware of the racially insensitive terms that exist in our projects. +We are working to correct this mistake. +We ask for your patience as we work through complex automated workflows that need to be updated. +``` + + +(test-and-code-quality-label)= + +### Test and code quality + +Follow the project's testing and code quality policies. +Most projects have a test suite and code quality checkers and formatters. +We strongly recommend that you run the project's test suite and code quality checks locally before proceeding. +This will save you and reviewers a lot of time and frustration. + +A bug fix or new feature should have a test that ensures that it works as intended. + + +(create-a-pull-request-from-your-fork-label)= + +### Create a pull request from your fork + +Once you have completed, tested, and linted your code, and created a {ref}`contributing-change-log-label`, then you can follow the standard practice for making a pull request. + +1. Commit and push your changes to your fork. + + ```shell + git add + git commit -m "My commit message" + git push + ``` + +1. Visit your fork of the Plone repository on 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) against the development branch. + - Make your title and description descriptive. + Don't be lazy with "Fixes bug" or other useless drivel. + - To automatically close the original issue when your pull request is merged, include "Closes #issue_number" in your description. + This also creates a hyperlink to the original issue for easy reference. +1. [Request a review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) from other team members. +1. Members who subscribe to the repository will receive a notification and review your request. + +```{todo} +Provide instructions when the contributor needs to update their pull request with changes from the default branch. +Members of Contributors do not have the button "Update branch" to easily do this, and must use git foo to manage the situation. +``` + +Welcome to the Plone community, and thank you for contributing! diff --git a/docs/contributing/index.md b/docs/contributing/index.md index 0bb915495..2f0780ee5 100644 --- a/docs/contributing/index.md +++ b/docs/contributing/index.md @@ -1,310 +1,135 @@ --- myst: html_meta: - "description": "Contributing to Plone 6 Documentation" - "property=og:description": "Contributing to Plone 6 Documentation" - "property=og:title": "Contributing to Plone 6 Documentation" + "description": "Contributing to Plone" + "property=og:description": "Contributing to Plone" + "property=og:title": "Contributing to Plone" "keywords": "Plone, Plone Contributor Agreement, License, Code of Conduct" --- -(contributing-index-label)= +(contributing-to-plone-index-label)= -# Contributing to documentation +# Contributing to Plone -This document describes how to contribute to Plone Documentation. +This part of the documentation describes how to contribute to Plone, including all its projects and repositories under the Plone GitHub organization. -Contributions to the Plone Documentation are welcome. +To contribute to any project in Plone, you must follow the policies of the [Plone Foundation](https://plone.org/foundation), [Plone GitHub organization](https://github.com/plone/) and the specific project. +This chapter covers policies that apply to all Plone projects. +Other chapters cover any variations and additional policies for each project. -(contributing-permission-to-publish-label)= -## Granting permission to publish +(contributing-sign-and-return-the-plone-contributor-agreement-label)= -Before you contribute, you must give permission to publish your contribution according to the license we use. -You may give that permission in two ways. +## Sign and return the Plone Contributor Agreement -- Sign the [Plone Contributor Agreement](https://plone.org/foundation/contributors-agreement). - This method also covers contributions to Plone code. - It is a one-time only process. -- In every pull request or commit message, include the following statement. +You must give permission to the Plone Foundation to publish your contribution, according to the license we use. +Plone uses the [GNU General Public License, version 2](https://github.com/plone/Products.CMFPlone/blob/master/LICENSE) for most of its projects and for any new projects. +A few other projects use the [modified BSD license](https://opensource.org/license/bsd-3-clause/). +You grant permission by signing and returning the Plone Contributor Agreement. - > 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. +```{button-link} https://plone.org/foundation/contributors-agreement +:color: primary -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/). -A copy of the license is included in the root of this repository. - - -(contributing-roles-label)= - -## Contributor roles - -Contributors to the Plone Documentation may perform one or many roles. - -- **Plone users and developers** use this documentation because it is accurate and actively maintained. - People in these roles typically contribute minor corrections. - They should read {doc}`setup-build` and {doc}`myst-reference`. -- **Authors** create Plone Documentation. - They should read {doc}`setup-build` and {doc}`myst-reference`. - They should also read {doc}`authors` for guidance and tips for writing good technical documentation. - - -(contributing-quality-requirements-label)= - -## Documentation quality requirements - -We use GitHub Actions with every pull request to enforce Plone Documentation quality. -We recommend that you build the documentation locally to catch errors and warnings early on. -See {doc}`setup-build` for instructions for how to set up and build the documentation and to run quality checks. - - -(contributing-manage-on-github-label)= - -## Making contributions on GitHub - -Contributions are managed through git repositories on GitHub. - -- [`documentation`](https://github.com/plone/documentation) -- [`plone.api`](https://github.com/plone/plone.api) -- [`plone.restapi`](https://github.com/plone/plone.restapi) -- [`volto`](https://github.com/plone/volto) - -In the Plone organization, it is strongly recommended that you read {ref}`contributing-permission-to-publish-label` and take appropriate action. - -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. - -1. Discuss whether you should perform any work. - Any method below is acceptable, but are listed in order of most likely to get a response. - - - Search for open issues in the issue trackers of documented projects, and comment on them. - If an issue does not already exist for what you want to work on, then create a new issue in its issue tracker. - - As a convenience, at the top right of every page, there is a GitHub navigation menu. - Tap, click, or hover over the GitHub Octocat icon for options. - - ```{image} /_static/github-navigation.png - :alt: GitHub navigation menu - ``` - - You can use this menu to quickly navigate to the `documentation` source repository or open an issue. - Note that this navigation convenience is provided only for the `documentation` repository. - - - [`documentation`](https://github.com/plone/documentation/issues) - - [`plone.api`](https://github.com/plone/plone.api/issues) - - [`plone.restapi`](https://github.com/plone/plone.restapi/issues) - - [`volto`](https://github.com/plone/volto/issues) - - - Discuss during sprints, conferences, trainings, and other Plone events. - - Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13). - - Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj). - -1. For first-time contributors especially, **you do not need to ask to be assigned to, or to work on, an open issue**. - As in any open source project, you can start work on open issues at your convenience. - - ```{tip} - 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. - This is because first-timers have a fresh perspective that might be overlooked by old-timers. - ``` - -1. Clarify the scope of work that needs to be done. - Check for previous work, assignment to another developer, or whether the requirements have changed. -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). - This signals to other developers that you are working on the issue. - -From here, you can either make {ref}`contributing-quick-edits-label` or {ref}`contributing-large-edits-label`. - - -(contributing-quick-edits-label)= - -### Quick edits - -Quick edits for minor issues, such as typographical errors, misspellings, and English grammar and syntax, can be made through the GitHub user interface. - -1. Navigate to the repository as noted in {ref}`contributing-manage-on-github-label`. -1. Navigate with the `docs` directory to find the source file to edit. -1. Click the {guilabel}`pencil icon` to edit the file in the browser. - - ```{image} /_static/edit-pencil-icon.png - :alt: GitHub Edit this file - ``` -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`. -1. Make your pull request against the branch `6-dev`. -1. Members who subscribe to the repository will receive a notification and review your request. -1. Request a review from other team members. +Sign the Plone Contributor Agreement +``` +After a member of the Plone Foundation reviews and accepts your signed agreement, your GitHub account will be added to a team in the Plone GitHub organization with appropriate access. +This process may take a few business days. -(contributing-large-edits-label)= +```{seealso} +- [Plone License FAQ](https://plone.org/foundation/copyright-licensing-logo/license-faq) +- [Plone Framework Components Relicensing Policy, Framework Components Available Under a BSD License](https://plone.org/foundation/about/materials/foundation-resolutions/plone-framework-components-relicensing-policy#3b050ad2-361a-46de-b5c6-9b90f8947eb7) +``` -### Large edits -For large edits, first follow the instructions in {doc}`setup-build`. +(contributing-code-of-conduct-label)= -Once you have your environment set up, then you can follow the standard practice for making a pull request. -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. +## Code of Conduct +The Plone Foundation has published a [Code of Conduct](https://plone.org/foundation/materials/foundation-resolutions/code-of-conduct). +All contributors to the Plone Documentation follow the Code of Conduct. -(contributing-documentation-only-label)= -### Working with only the `plone/documentation` repository +(contributing-first-time-contributors-label)= -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`. +## First-time contributors -1. From the project root directory, sync your local `6-dev` branch with its remote. - You might need to resolve conflicts. +First-time contributors should read and follow our guide {doc}`first-time`. - ```shell - git checkout 6-dev - git pull - ``` -1. Create a new branch from `6-dev`. +(contributing-continuous-integration-label)= - ```shell - git checkout -b - ``` +## Continuous integration -1. Edit files, save, preview, and test. - You must run and pass the builds `html` and `linkcheck` without causing new errors. +Plone project repositories use continuous integration (CI) to run tests, ensure code quality, or provide previews for every contribution. +Plone uses GitHub Actions, Jenkins, Cypress, Netlify, and other services for CI. +All of a project's CI jobs must pass before a contribution may be accepted. - ```shell - # Optionally clean the builds to avoid cache issues - make clean - make html - make linkcheck - ``` - ```{note} - Currently there are some errors on the `html` build, mostly due to empty `meta` HTML tags. - You are welcome to fix as many errors as you like. - You are only responsible to fix errors that you create. - ``` +(contributing-change-log-label)= - ```{note} - Eventually the `vale` build will be required, but not at this time. - We welcome improvements to the dictionary. - ``` +## Change log entry - ```{seealso} - {ref}`setup-build-available-documentation-builds-label`. - ``` +Plone projects require that you include a change log entry or news item with your contribution. +This is enforced by continuous integration through GitHub Actions. -1. After the builds pass, commit changes to your branch, and push it to the remote repository on GitHub. - The remote repository may be either a branch in your fork of the project or a branch in the `plone/documentation` upstream repository. +Plone uses [`towncrier`](https://github.com/collective/zestreleaser.towncrier) to manage change log entries and to automatically generate history or change log files from the entries. +The log file is usually named `CHANGES.rst`, `CHANGES.md`, or `CHANGELOG.md`, and is located at the root of the project. +When a project is released with a new version, the release manager runs `towncrier` as part of the release process. +Because the log file is automatically generated, you should not edit it directly, except to make corrections, such as broken links. - ```shell - git commit -m "My descriptive commit message" - git push - ``` +To create a change log entry or news item, create a file that is placed in the root of the repository directory at `/news`. +Its format must be `###.type`, where `###` is the referenced GitHub issue or pull request number, `.` is the literal extension delimiter, and `type` is one of the following strings. -1. Visit the GitHub `documentation` repository, and [create a pull request](https://github.com/plone/documentation/compare) against the branch `6-dev`. -1. Members who subscribe to the repository will receive a notification and review your request. -1. Request a review from other team members. +- `breaking` for breaking changes +- `bugfix` for bug fixes +- `documentation` for documentation +- `feature` for new features +- `internal` for internal changes +A project configures the types it allows in a file `towncrier.toml` located at the root of its repository. -(contributing-editing-external-package-documentation-label)= +The content of this file must include the following. -### Editing external package documentation +- A brief message that summarizes the changes in your contribution. +- An attribution to yourself, in the format of `@github_username`. -If you want to edit documentation of imported external packages, the process is slightly different. -We use `git submodules` to manage multiple repositories. -We imported the external repositories the `plone/documentation` repository as described in {doc}`setup-build`. +The following text is an example change log entry, placed inside {file}`/news/4569.documentation`. -```{important} -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. -These branches may change as we get closer to a production release. +```text +Fix broken links for ReactJS.org. @stevepiercy ``` -1. From the project root directory, sync your local `6-dev` branch with its remote. - You might need to resolve conflicts. - - ```shell - git checkout 6-dev - git pull - ``` - -1. Change your working directory to the imported package's directory under `submodules/`. - - ```shell - # Choose one. - cd submodules/plone.api - cd submodules/plone.restapi - cd submodules/volto - ``` - -1. Update the submodule, and sync your local development branch with its remote. - You might need to resolve conflicts. - - ```shell - git submodule update - - # for plone.api - git checkout master - # for plone.restapi - git checkout master +(contributing-specific-contribution-policies-for-projects-label)= - # for volto - git checkout master +## Specific contribution policies of projects - git pull - ``` +Each Plone project may have specific contribution policies and guidance. +This may include writing tests, developing add-ons, internationalization and localization, logging, and debugging. -1. Create a new branch from the development branch. +The following is an abridged list of actively developed Plone projects with links to how to contribute to them. - ```shell - git checkout -b - ``` +`Products.CMFPlone` +: The primary Plone project. + See its [repository](https://github.com/plone/Products.CMFPlone). -1. Make edits to files in `docs/` using your favorite editor, and save, preview, and test. - You must run and pass the builds `html` and `linkcheck` without causing new errors. +Documentation +: "If it's not documented, it's broken." + See {doc}`documentation/index`. - ```shell - # Optionally clean the builds to avoid cache issues. - # Note that for the external packages' documentation only, - # we use "docs-" as a prefix for make targets to avoid a conflicts. - make docs-clean - make docs-html - make docs-linkcheck - ``` +Plone API +: API methods for Plone functionality. + See {doc}`../plone.api/contribute/index`. -1. Back in `submodules/`, commit and push your changes to the remote. +Plone REST API +: A RESTful API for Plone. + See {doc}`plone.restapi/docs/source/contributing/index`. - ```shell - git add - git commit -m "My commit message" - git push - ``` - -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. - - ```shell - cd ../.. - - # for plone.api - git add submodules/plone.api - git commit -m "Update submodules/plone.api tip" - - # for plone.restapi - git add submodules/plone.restapi - git commit -m "Update submodules/plone.restapi tip" - - # for Volto - git add submodules/volto - git commit -m "Update submodules/volto tip" - - git push - ``` - -1. Visit the GitHub `plone/` repository, and create a pull request against the development branch. -1. Members who subscribe to the `plone/` repository will receive a notification and review your request. -1. Request a review from other team members. - - -(contributing-code-of-conduct-label)= - -## Code of Conduct - -The Plone Foundation has published a [Code of Conduct](https://plone.org/foundation/materials/foundation-resolutions/code-of-conduct). -All contributors to the Plone Documentation follow the Code of Conduct. +Volto +: Plone 6 default frontend. + See {doc}`../volto/developer-guidelines/contributing`. ```{toctree} @@ -314,9 +139,9 @@ maxdepth: 2 hidden: true --- -setup-build -authors -myst-reference -sphinx-extensions -admins +first-time +documentation/index +../plone.api/contribute/index +../plone.restapi/docs/source/contributing/index +../volto/developer-guidelines/contributing ```