Skip to content

Commit 43ea15d

Browse files
committed
Contributing content [skip ci]
1 parent c08e1b5 commit 43ea15d

File tree

9 files changed

+2154
-0
lines changed

9 files changed

+2154
-0
lines changed
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
---
2+
title: "Contributing to the Selenium Site & Documentation"
3+
linkTitle: "Contributing to the Selenium Site & Documentation"
4+
weight: 2
5+
---
6+
7+
{{% pageinfo color="warning" %}}
8+
<p class="lead">
9+
<i class="fas fa-language display-4"></i>
10+
Page being translated from
11+
English to German. Do you speak German? Help us to translate
12+
it by sending us pull requests!
13+
</p>
14+
{{% /pageinfo %}}
15+
16+
17+
Selenium is a big software project, its site and documentation are key
18+
to understanding how things work and learning effective ways to exploit
19+
its potential.
20+
21+
This project contains both Selenium's site and documentation. This is
22+
an ongoing effort (not targeted at any specific release) to provide
23+
updated information on how to use Selenium effectively, how to get
24+
involved and how to contribute to Selenium.
25+
26+
Contributions toward the site and docs follow the process described in
27+
the below section about contributions.
28+
29+
---
30+
31+
The Selenium project welcomes contributions from everyone. There are a
32+
number of ways you can help:
33+
34+
## Report an issue
35+
36+
When reporting a new issues or commenting on existing issues please
37+
make sure discussions are related to concrete technical issues with the
38+
Selenium software, its site and/or documentation.
39+
40+
All of the Selenium components change quite fast over time, so this
41+
might cause the documentation to be out of date. If you find this to
42+
be the case, as mentioned, don't hesitate to create an issue for that.
43+
It also might be possible that you know how to bring up to date the
44+
documentation, so please send us a pull request with the related
45+
changes.
46+
47+
If you are not sure about what you have found is an issue or not,
48+
please ask through the communication channels described at
49+
https://selenium.dev/support.
50+
51+
## Contributions
52+
53+
The Selenium project welcomes new contributors. Individuals making
54+
significant and valuable contributions over time are made _Committers_
55+
and given commit-access to the project.
56+
57+
This guide will guide you through the contribution process.
58+
59+
### Step 1: Fork
60+
61+
Fork the project [on Github](https://github.com/seleniumhq/seleniumhq.github.io)
62+
and check out your copy locally.
63+
64+
```shell
65+
% git clone git@github.com:seleniumhq/seleniumhq.github.io.git
66+
% cd seleniumhq.github.io
67+
```
68+
69+
#### Dependencies: Hugo
70+
71+
We use [Hugo](https://gohugo.io/) to build and render the site and docs.
72+
To verify everything locally before even committing any changes, please
73+
[install Hugo](https://gohugo.io/getting-started/installing/), get familiar
74+
with it and [run the local server](https://gohugo.io/getting-started/usage/#livereload)
75+
to render the site locally (detailed instructions can be found in the
76+
next steps).
77+
78+
### Step 2: Branch
79+
80+
Create a feature branch and start hacking:
81+
82+
```shell
83+
% git checkout -b my-feature-branch
84+
```
85+
86+
We practice HEAD-based development, which means all changes are applied
87+
directly on top of `trunk`.
88+
89+
### Step 3: Make changes
90+
91+
The repository contains the site and docs, which are two separate Hugo
92+
projects. If you want to make changes to the site, work on the
93+
`site_source_files` directory. To see a live preview of your changes,
94+
run `hugo server` on the site's root directory.
95+
96+
```shell
97+
% cd site_source_files
98+
% hugo server
99+
```
100+
101+
To make changes to the docs, switch to the `docs_source_files` directory.
102+
103+
```shell
104+
% cd docs_source_files
105+
% hugo server
106+
```
107+
108+
#### Capitalisation of titles
109+
110+
One should avoid title capitalisation,
111+
such as _A Very Fine Heading_,
112+
and instead go for _A very fine heading_.
113+
Gratuitous capitalisation, or title case,
114+
often show a misunderstanding of – or a disregard for –
115+
orthographic conventions.
116+
We prefer what is known as _sentence case_,
117+
with a single initial capital to start headers.
118+
119+
#### Line length
120+
121+
When editing the documentation’s source,
122+
which is written in plain HTML,
123+
limit your line lengths to around 72 characters.
124+
125+
Some of us take this one step further
126+
and use what is called
127+
[_semantic linefeeds_](//rhodesmill.org/brandon/2012/one-sentence-per-line),
128+
which is a technique whereby the HTML source lines,
129+
which are not read by the public,
130+
are split at ‘natural breaks’ in the prose.
131+
In other words, sentences are split
132+
at natural breaks between clauses.
133+
Instead of fussing with the lines of each paragraph
134+
so that they all end near the right margin,
135+
linefeeds can be added anywhere
136+
that there is a break between ideas.
137+
138+
This can make diffs very easy to read
139+
when collaborating through git,
140+
but it is not something we enforce contributors to use.
141+
142+
#### Translations
143+
144+
The docs are translated into several languages, and translations are based on
145+
the English content. When you are changing a file, **be sure** to make your
146+
changes in all the other translated files as well. This might differ depending
147+
on the change, for example:
148+
149+
* If you add a code example to the `browser_manipulation.en.md` file,
150+
also add it to `browser_manipulation.es.md`, `browser_manipulation.ef.md`,
151+
`browser_manipulation.ja.md`, and all other translated files.
152+
* If you find a translation that can be improved, only change the translated
153+
file.
154+
* If you are adding a new language translation, add the new files with the
155+
appropriate suffix. There is no need to have everything translated to submit a
156+
PR, it can be done iteratively. Don't forget to check some needed configuration
157+
values in the `config.toml` file.
158+
* If you make text changes in the English version, replace the same section in
159+
the translated files with your change (yes, in English), and add the following
160+
notice at the top of the file.
161+
162+
163+
```
164+
{{%/* pageinfo color="warning" */%}}
165+
<p class="lead">
166+
<i class="fas fa-language display-4"></i>
167+
Page being translated from
168+
English to {LANGUAGE}. Do you speak {LANGUAGE}? Help us to translate
169+
it by sending us pull requests!
170+
</p>
171+
{{%/* /pageinfo */%}}
172+
```
173+
174+
### Step 4: Commit
175+
176+
First make sure git knows your name and email address:
177+
178+
```shell
179+
% git config --global user.name 'Santa Claus'
180+
% git config --global user.email 'santa@example.com'
181+
```
182+
183+
**Writing good commit messages is important.** A commit message
184+
should describe what changed, why, and reference issues fixed (if
185+
any). Follow these guidelines when writing one:
186+
187+
1. The first line should be around 50 characters or less and contain a
188+
short description of the change.
189+
2. Keep the second line blank.
190+
3. Wrap all other lines at 72 columns.
191+
4. Include `Fixes #N`, where _N_ is the issue number the commit
192+
fixes, if any.
193+
194+
A good commit message can look like this:
195+
196+
```text
197+
explain commit normatively in one line
198+
199+
Body of commit message is a few lines of text, explaining things
200+
in more detail, possibly giving some background about the issue
201+
being fixed, etc.
202+
203+
The body of the commit message can be several paragraphs, and
204+
please do proper word-wrap and keep columns shorter than about
205+
72 characters or so. That way `git log` will show things
206+
nicely even when it is indented.
207+
208+
Fixes #141
209+
```
210+
211+
The first line must be meaningful as it's what people see when they
212+
run `git shortlog` or `git log --oneline`.
213+
214+
### Step 5: Rebase
215+
216+
Use `git rebase` (not `git merge`) to sync your work from time to time.
217+
218+
```shell
219+
% git fetch upstream
220+
% git rebase upstream/trunk
221+
```
222+
223+
### Step 6: Test
224+
225+
Always remember to [run the local server](https://gohugo.io/getting-started/usage/#livereload),
226+
with this you can be sure that your changes have not broken anything.
227+
228+
### Step 7: Push
229+
230+
```shell
231+
% git push origin my-feature-branch
232+
```
233+
234+
Go to https://github.com/yourusername/seleniumhq.github.io.git and
235+
press the _Pull Request_ and fill out the form. **Please indicate
236+
that you've signed the CLA** (see Step 7).
237+
238+
Pull requests are usually reviewed within a few days. If there are
239+
comments to address, apply your changes in new commits (preferably
240+
[fixups](http://git-scm.com/docs/git-commit)) and push to the same
241+
branch.
242+
243+
### Step 8: Integration
244+
245+
When code review is complete, a committer will take your PR and
246+
integrate it on the repository's trunk branch. Because we like to keep a
247+
linear history on the trunk branch, we will normally squash and rebase
248+
your branch history.
249+
250+
## Communication
251+
252+
All details on how to communicate with the project contributors
253+
and the community overall can be found at https://selenium.dev/support

0 commit comments

Comments
 (0)