Skip to content

Commit 3542d8a

Browse files
committed
Update Contributing Document
This PR updates the contributing guide.
1 parent 0b5a59b commit 3542d8a

1 file changed

Lines changed: 42 additions & 55 deletions

File tree

CONTRIBUTING.md

Lines changed: 42 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
1-
# Contributing Guide
1+
# Documentation contributing guide
22

33
Thank you for deciding to contribute and help us improve Percona Distribution for PostgreSQL documentation!
44

55
We welcome contributors from all users and community. By contributing, you agree to the [Percona Community code of conduct](https://github.com/percona/community/blob/main/content/contribute/coc.md).
66

7-
You can contribute to documentation in the following ways:
8-
9-
1. **Request a doc change through a Jira issue**. If you’ve spotted a doc issue (a typo, broken links, inaccurate instructions, etc.) but don’t have time nor desire to fix it yourself - let us know about it.
7+
If you want to contribute code, see the [Code contribution guide](https://github.com/percona/postgres/blob/PSP_REL_18_STABLE/.github/CONTRIBUTING.md).
108

11-
- Click the **Submit DOC bug** link on the sidebar. This opens the [Jira issue tracker](https://jira.percona.com/projects/PG/issues) for the doc project.
12-
- Sign in (create a Jira account if you don’t have one) and click **Create** to create an issue.
13-
- Describe the issue you have detected in the Summary, Description, Steps To Reproduce, Affects Version fields.
9+
You can contribute to documentation in the following ways:
1410

15-
2. **[Contribute to documentation yourself](#contribute-to-documentation-yourself)**. Click the <img src="_resource/.icons/edit_page.png" style="width: 1em; height: 1em;"> **Edit this page** icon that leads you to the source file of the page on GitHub. There you make changes, create a pull request that we review and add to the doc project. For details how to do it, read on.
11+
1. Request a doc change through Jira:
1612

13+
- Open the [Jira issue tracker](https://jira.percona.com/projects/PG/issues) for the project.
14+
- (Optional but recommended) Search if the issue you want to report is already reported.
15+
- Sign in (create a Jira account if you don’t have one) and click **Create** to create an issue.
16+
- Select **PostgreSQL PG** in the Project dropdown and the work type **Story**.
17+
- Describe the issue you have detected in the Summary, Description, Steps To Reproduce and Affects Version fields.
1718

18-
## Contribute to documentation yourself
19+
2. [Contribute to documentation on GitHub](#contribute-to-the-documentation-online-via-github).
1920

2021
To contribute to the documentation, you should be familiar with the following technologies:
21-
- [Markdown](https://www.markdownguide.org/basic-syntax/) markup language. It is used to write the documentation.
22+
23+
- [Markdown](https://www.markdownguide.org/basic-syntax/). The documentation is written in Markdown.
2224
- [MkDocs](https://www.mkdocs.org/getting-started/) documentation generator. We use it to convert source ``.md`` files to html and PDF documents.
2325
- [git](https://git-scm.com/) and [GitHub](https://guides.github.com/activities/hello-world/)
2426
- [Docker](https://docs.docker.com/get-docker/). It allows you to run MkDocs in a virtual environment instead of installing it and its dependencies on your machine.
2527

26-
There are several active versions of the documentation. Each version derives from the major version of PostgreSQL, included in the distribution.
28+
## Contribute to the documentation online via GitHub
29+
30+
There are several active versions of the documentation. Each version derives from the major version of PostgreSQL, included in the distribution.
2731

2832
Each version has a branch in the repository named accordingly:
2933

@@ -36,22 +40,26 @@ Each version has a branch in the repository named accordingly:
3640
- 17
3741
- 18
3842

39-
The source .md files are in the ``docs`` directory.
43+
The source .md files are in the ``postgresql-docs/docs`` directory.
44+
45+
To start contributing:
4046

41-
### Edit documentation online via GitHub
47+
1. Click the **Edit this file** icon.
4248

43-
1. Click the <img src="_resource/.icons/edit_page.png" style="width: 1em; height: 1em;"> **Edit this page** icon next to the page title. The Markdown file of the page opens in GitHub editor in your browser. If you haven’t worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.
49+
[!NOTE]
50+
If you haven’t worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.
4451

45-
2. Edit the page. You can check your changes on the **Preview** tab.
52+
2. Add your changes. You can see how your edit looks like in the **Preview** tab.
4653

4754
3. Commit your changes.
4855

49-
- In the *Commit changes* section, describe your changes.
50-
- Select the **Create a new branch for this commit and start a pull request** option
51-
- Click **Propose changes**.
56+
- Describe the changes you have made
57+
- Select the **Create a new branch for this commit** and name your branch
58+
- Click **Propose changes** to create the pull request
5259

53-
4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button.
54-
5. Someone from our team reviews the pull request and if everything is correct, merges it into the documentation. Then it gets published on the site.
60+
4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute changes. When you are ready, click the **Create pull request** button.
61+
62+
5. Your changes will be reviewed and merged into the documentation.
5563

5664
### Edit documentation locally
5765

@@ -69,7 +77,7 @@ git clone git@github.com:percona/postgresql-docs.git
6977
3. Change the directory to ``postgresql-docs`` and add your local repository:
7078

7179
```sh
72-
git remote add <your-repo-name> git@github.com:<your_name>/postgresql-docs.git
80+
git remote add <my-repo-name> git@github.com:<my_name>/postgresql-docs.git
7381
```
7482

7583
4. Pull the latest changes
@@ -84,48 +92,27 @@ Make sure that your local branch and the branch you merge changes from are the s
8492
5. Create a separate branch for your changes
8593

8694
```sh
87-
git checkout -b <my_changes>
95+
git checkout -b <my_branch_name>
8896
```
8997

90-
6. Make changes
91-
7. Commit your changes
92-
8. Open a pull request to Percona
93-
94-
### Building the documentation
95-
96-
To verify how your changes look, generate the static site with the documentation. This process is called *building*. You can do it in these ways:
97-
- [use Docker](#use-docker)
98-
- [install MkDocs and build locally](#install-mkdocs-and-build-locally)
99-
100-
Learn more about the documentation structure in the [Repository structure](#repository-stucture) section.
101-
98+
6. Make a commit mentioning the Jira issue in the commit message if any:
10299

103-
#### Use Docker
104-
105-
1. [Get Docker](https://docs.docker.com/get-docker/)
106-
2. We use [this Docker image](https://github.com/Percona-Lab/percona-doc-docker) to build documentation. Run the following command:
107-
108-
```sh
109-
docker run --rm -v $(pwd):/docs perconalab/pmm-doc-md mkdocs build
110-
```
111-
If Docker can't find the image locally, it first downloads the image, and then runs it to build the documentation.
112-
113-
3. Go to the ``site`` directory and open the ``index.html`` file to see the documentation.
114-
4. To view your changes as you make them, run the following command:
100+
```
101+
git add .
102+
git commit -m "<my_fixes>"
103+
git push -u origin <my_branch_name>
104+
```
115105

116-
``` sh
117-
docker run --rm -p 8000:8000 -v $(pwd):/docs perconalab/pmm-doc-md mkdocs serve -a 0.0.0.0:8000
118-
```
106+
7. Open a pull request to Percona
119107

120-
5. To create a PDF version of the documentation, run the following command:
108+
### Building the documentation using MkDocs
121109

122-
```sh
123-
docker run --rm -v $(pwd):/docs -e ENABLE_PDF_EXPORT=1 perconalab/pmm-doc-md mkdocs build -f mkdocs-pdf.yml
124-
```
110+
To verify how your changes look, generate the static site with the documentation. This process is called *building*.
125111

126-
The PDF document is in the ``site/pdf`` folder.
112+
[!NOTE]
113+
Learn more about the documentation structure in the [Repository structure](#repository-structure) section.
127114

128-
#### Install MkDocs and build locally
115+
To verify how your changes look, you can generate a static site locally:
129116

130117
1. Install [pip](https://pip.pypa.io/en/stable/installing/)
131118
2. Install [MkDocs](https://www.mkdocs.org/getting-started/#installation).

0 commit comments

Comments
 (0)