備註
您正在閱讀開發版本的文件。對於最新發行的版本,請參見 Lyrical。
Contributing to documentation
ROS documentation is maintained by the community and helps users learn, build, and contribute effectively. This article describes where the documentation source lives, how it is structured, and how contributors submit changes.
Area: contributing, community | Content-type: about | Experience: beginner, intermediate, expert
摘要
Contributions to the ROS documentation are very welcome. The ROS documentation is written in reStructuredText (RST), and built using Sphinx. You can find the documentation source code on GitHub. Use the standard GitHub fork and pull request (PR) workflow when making your docs contributions.
This article relates to contributing to the ROS documentation site. For more information about creating or updating package documentation, see Documenting a ROS 2 package.
Tools
ROS documentation is written in reStructuredText (RST), with additional roles and directives. The site is built using Sphinx, and more particularly using Sphinx multiversion.
For more information about using these tools to make updates to the documentation and build the site, see:
Branch structure
The source code of the documentation is located in the ROS Documentation GitHub repository. This repository is set up with one branch per ROS distribution to handle differences between the distributions:
If a change is common to all ROS distributions, it should be made to the
rollingbranch (and then will be backported as appropriate).If a change is specific to a particular ROS distribution, it should be made to the respective branch.
Source structure
The source files for the site are all located under the
sourcesubdirectory.Templates for various Sphinx plugins are located under
source/_templates.The root directory contains configuration and files required to locally build the site for testing.
Workflow
Contributors to the ROS documentation on GitHub use the standard fork and pull request (PR) workflow.
After creating your own fork of the
ros2_documentationrepository, clone it locally, and then create a branch from the existingrollingbranch for your changes.When your change to the documentation source is ready on your branch, create a pull request to the upstream repository. Your PR will attract review comments and suggestions from the ROS community, which you can then action and agree on.
When your PR is accepted, it is merged to the target branch and published to the respective versions of the site.