Skip to content

Commit a4410ad

Browse files
committed
<various>: Reorganise content about contributing.
* Move contents of `style-guide` and `submitting` to `CONTRIBUTING`. * Move contents of `usage-statistics` to `contributing/index`. * Remove `style-guide`, `submitting`, `usage-statistics`. * Modify text of `CONTRIBUTING` appropriately. * Modify and improve text of `contributing/index`.
1 parent ecd8e2c commit a4410ad

File tree

7 files changed

+360
-329
lines changed

7 files changed

+360
-329
lines changed

CONTRIBUTING.md

Lines changed: 325 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,327 @@
1-
To contribute to the Void documentation, please read the following sections of the Void Handbook. Pull requests that do not meet the criteria described in these sections will not be merged. Please try to address as many of the criteria as possible before submitting a PR - that will improve the chances of your contribution being accepted quickly.
1+
# Contributing
22

3-
- [About this Handbook](https://docs.voidlinux.org/about/about-this-handbook.html)
4-
- [Style Guide](https://docs.voidlinux.org/contributing/void-docs/style-guide.html)
5-
- [Submitting Changes](https://docs.voidlinux.org/contributing/void-docs/submitting.html)
3+
To contribute to the Void documentation, please read the following. Pull
4+
requests that do not meet the criteria described below will not be merged.
5+
Before submitting a PR:
66

7-
In particular, please be sure to run this repository's `check.sh` script, and to address any issues it raises, before submitting your PR.
7+
- try to address as many of the criteria as possible; and
8+
- run the `check.sh` script provided in the repository root, addressing any
9+
issues it reports.
10+
11+
This will improve the chances of your contribution being accepted quickly.
12+
13+
## Contents
14+
15+
- [Suitable Content](#suitable-content)
16+
- [Style Guide](#style-guide)
17+
- [Submitting Changes](#submitting-changes)
18+
19+
## Suitable content
20+
21+
The Handbook is not intended to be a general guide to using a Linux system, as
22+
[noted in the "About"
23+
section](https://docs.voidlinux.org/about/about-this-handbook.html):
24+
25+
> This handbook is not an extensive guide on how to use and configure common
26+
> Linux software. The purpose of this document is to explain how to install,
27+
> configure, and maintain Void Linux systems, and to highlight the differences
28+
> between common Linux distributions and Void ...
29+
>
30+
> Those looking for tips and tricks on how to configure a Linux system in
31+
> general should consult upstream software documentation. Additionally, the Arch
32+
> Wiki provides a fairly comprehensive outline of common Linux software
33+
> configuration, and a variety of internet search engines are available for
34+
> further assistance.
35+
36+
Thus, we are unlikely to accept contributions which add information that is not
37+
particularly Void-specific.
38+
39+
## Style Guide
40+
41+
This style guide outlines the standards for contributing to the Handbook. The
42+
manual on <https://docs.voidlinux.org> is generated from an
43+
[mdBook](https://rust-lang.github.io/mdBook/) stored in the
44+
[void-docs](https://github.com/void-linux/void-docs/) repository.
45+
46+
### General
47+
48+
Although there will always be cases where command listings are appropriate, the
49+
contents of the Handbook should be written in American English.
50+
51+
Outside of the 'installation' sections, step-by-step instructions containing
52+
'magic' commands for copying-and-pasting are strongly discouraged. Users are
53+
expected to read the canonical documentation (e.g. man pages) for individual
54+
programs to understand how to use them, rather than relying on
55+
copying-and-pasting.
56+
57+
Command code-blocks should not be used to describe routine tasks documented
58+
elsewhere in this Handbook. For example, when writing documentation for the
59+
`foo` package, do not provide a command code-block stating that one should
60+
install it via `xbps-install foo`. Similarly, do not provide code blocks
61+
describing how to enable the `foo` service.
62+
63+
### Formatting
64+
65+
For markdown formatting, the
66+
[void-docs](https://github.com/void-linux/void-docs/) project uses the
67+
[Versioned Markdown](https://github.com/bobertlo/vmd) format, and enforces use
68+
of the auto-formatter `vmdfmt`, which works very similarly to `gofmt`. Most
69+
valid markdown is accepted by the formatter. The output format is described in
70+
the project's [README](https://github.com/bobertlo/vmd/blob/master/README.md).
71+
72+
After installing the `vmdfmt` package, you can format a file by running:
73+
74+
```
75+
vmdfmt -w <filepath>
76+
```
77+
78+
To format the entire mdbook from the repository root, outputting a list of files
79+
modified, run:
80+
81+
```
82+
vmdfmt -w -l <filepath>
83+
```
84+
85+
`vmdfmt` is used by the void-docs repository's `check.sh` script, which must be
86+
[run locally before submitting a pull request](#making-changes).
87+
88+
### Commands
89+
90+
Command code-blocks should start with a `#` or `$` character, indicating whether
91+
the command should be run as `root` or a regular user, respectively.
92+
93+
For example:
94+
95+
```
96+
# vi /etc/fstab
97+
```
98+
99+
and not:
100+
101+
```
102+
$ sudo vi /etc/fstab
103+
```
104+
105+
and also not:
106+
107+
```
108+
vi /etc/fstab
109+
```
110+
111+
Command code-blocks should be introduced with a colon (':'), i.e.:
112+
113+
> For example:
114+
>
115+
> `$ ls -l`
116+
117+
#### Placeholders
118+
119+
Placeholders indicate where the user should substitute the appropriate
120+
information. They should use angle brackets (`<` and `>`) and contain only
121+
lower-case text, with words separated by underscores. For example:
122+
123+
```
124+
# ln -s /etc/sv/<service_name> /var/service/
125+
```
126+
127+
and not:
128+
129+
```
130+
# ln -s /etc/sv/[SERVICENAME] /var/service/
131+
```
132+
133+
### Links
134+
135+
Link text should not include sentence-level punctuation. For example:
136+
137+
```
138+
[Visit this site](https://example.org).
139+
```
140+
141+
and not:
142+
143+
```
144+
[Visit this site.](https://example.org)
145+
```
146+
147+
#### Internal links
148+
149+
Links to other sections of the Handbook must be relative. For example:
150+
151+
```
152+
[example](./example.md#heading-text)
153+
```
154+
155+
and not:
156+
157+
```
158+
[example](example.md#heading-text)
159+
```
160+
161+
When referring literally to a Handbook section, the section title should be
162+
placed in double-quotes. Otherwise, double-quotes are not required. For example:
163+
164+
```
165+
For more information, please read the "[Power Management](./power-management.md)" section.
166+
```
167+
168+
and
169+
170+
```
171+
Void provides facilities to assist with [power management](./power-management.md).
172+
```
173+
174+
#### Man Page Links
175+
176+
The first reference to a command or man page must be a link to the relevant man
177+
page on `https://man.voidlinux.org/`.
178+
179+
The link text must contain the title section number in parenthesis, and contain
180+
no formatting. For example: [man(1)](https://man.voidlinux.org/man.1), not
181+
[`man(1)`](https://man.voidlinux.org/man.1).
182+
183+
#### Auto Links
184+
185+
Auto links (links with the same title as URL) should use the following notation:
186+
187+
```
188+
<https://www.example.com/>
189+
```
190+
191+
They should not be formatted like this:
192+
193+
```
194+
[https://www.example.com/](https://www.example.com/)
195+
```
196+
197+
#### Checking links
198+
199+
If you're including new links (either internal or external) in the docs or
200+
changing the current file structure, you should make use of the
201+
`mdbook-linkcheck` package:
202+
203+
```
204+
$ mdbook-linkcheck -s
205+
```
206+
207+
This will verify all the references, and warn you if there are any issues. If
208+
any link you're using is correct but generating errors for some reason, you can
209+
add its domain to the exclude list in `book.toml`, under the
210+
`[mdbook.linkcheck]` key.
211+
212+
`mdbook-linkcheck` is used by the void-docs repository's `check.sh` script,
213+
which must be [run locally before submitting a pull request](#making-changes).
214+
215+
### Case
216+
217+
Filenames and directories should use [kebab
218+
case](https://en.wikipedia.org/wiki/Kebab_case) when splitting words. For
219+
example the filename should be `post-install.md` not `postinstall.md`.
220+
221+
Words that are part of trademarks or well known package names are exempt from
222+
this rule. Examples include `PulseAudio` and `NetworkManager` which are well
223+
known by their squashed names.
224+
225+
### Voice
226+
227+
Prefer the active imperative voice when writing documentation. Consider the
228+
following examples:
229+
230+
> Now we need to install the CUPS drivers and configure them.
231+
232+
This version is conversational and friendlier, but contains unnecessary language
233+
that may not be as clear to an ESL reader.
234+
235+
> Install and configure the CUPS drivers, then configure them as shown.
236+
237+
This version contains a clear command to act, and a follow up that shows what
238+
will be done next. It is clear both to native English speakers, ESL readers, and
239+
to translators.
240+
241+
### Notes
242+
243+
Notes should only be used sparingly, and for non-critical information. They
244+
should begin with "Note: ", and not be block-quoted with `>`. For example, the
245+
Markdown should look like:
246+
247+
```
248+
Note: You can also use program X for this purpose.
249+
```
250+
251+
and not:
252+
253+
```
254+
> You can also use program X for this purpose.
255+
```
256+
257+
### Block quotes
258+
259+
Block quotes (i.e. `>`) should only be used to quote text from an external
260+
source.
261+
262+
## Submitting Changes
263+
264+
Proposed changes should be submitted as pull requests to the
265+
[void-docs](https://github.com/void-linux/void-docs) repository on
266+
[GitHub](https://github.com/). Please note that, unlike a wiki, submissions will
267+
be reviewed before they are merged. If any changes are required they will need
268+
to be made before the pull request is accepted. This process is in place to
269+
ensure the quality and standards of the Handbook are sustained.
270+
271+
### Requirements
272+
273+
To clone the repository and push changes,
274+
[git(1)](https://man.voidlinux.org/git.1) is required. It can be installed via
275+
the `git` package.
276+
277+
Building the Handbook locally requires
278+
[mdBook](https://rust-lang.github.io/mdBook/), which can be installed via the
279+
`mdBook` package.
280+
281+
### Forking
282+
283+
To fork the repository a [GitHub account](https://github.com/join) is needed.
284+
Once you have an account, follow GitHub's
285+
[guide](https://help.github.com/en/articles/fork-a-repo) on setting up a fork.
286+
287+
Clone the repository onto your computer, enter it, and create a new branch:
288+
289+
```
290+
$ git clone https://github.com/<your_username>/void-docs.git
291+
$ cd void-docs
292+
$ git checkout -b <branch_name>
293+
```
294+
295+
You can then edit the repository files as appropriate.
296+
297+
### Making changes
298+
299+
To serve the docs locally and view your changes, run `mdbook serve` from the
300+
root of the repository.
301+
302+
Once you're satisfied with your changes, run the `check.sh` script provided in
303+
the repository root. This will run the `vmdfmt` command, which will wrap the
304+
text appropriately, and the `mdbook-linkcheck` command, which will check for
305+
broken links. Address any issues raised by `check.sh`.
306+
307+
Once `check.sh` runs without errors, push your changes to your forked
308+
repository:
309+
310+
```
311+
$ git add <edited_file(s)>
312+
$ git commit -m "<commit_message>"
313+
$ git push --set-upstream origin <branch_name>
314+
```
315+
316+
The commit message should be in the form `<filename>: <description_of_changes>`.
317+
318+
Pull requests should only contain a single commit. If a change is made after the
319+
initial commit, `git add` the changed files and then run `git commit --amend`.
320+
The updated commit will need to be force-pushed: `git push --force`.
321+
322+
If multiple commits are made they will need to be squashed into a single commit
323+
with `git rebase -i HEAD~X`, where `X` is the number of commits that need to be
324+
squashed. An editor will appear to choose which commits to squash. A second
325+
editor will appear to choose the commit message. See
326+
[git-rebase(1)](https://man.voidlinux.org/git-rebase.1) for more information.
327+
The updated commit will need to be force-pushed: `git push --force`.

src/SUMMARY.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,4 @@
7171
- [Common Errors](./xbps/troubleshooting/common-errors.md)
7272
- [Static XBPS](./xbps/troubleshooting/static.md)
7373
- [Contributing](./contributing/index.md)
74-
- [Usage Statistics](./contributing/usage-statistics.md)
7574
- [Contributing To void-docs](./contributing/void-docs/index.md)
76-
- [Style Guide](./contributing/void-docs/style-guide.md)
77-
- [Submitting Changes](./contributing/void-docs/submitting.md)

src/contributing/index.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
11
# Contributing
22

3-
There's more to running a distribution than just writing code. This section
4-
explains how to be an active part of Void.
3+
There's more to running a distribution than just writing code.
54

6-
Please also visit the Void Web site for further information about [how to
7-
participate](https://voidlinux.org/contribute/), including our communication
8-
channels and how to contribute to the Void package repository.
5+
To contribute to the Void packages repository, start by reading the
6+
[CONTRIBUTING](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md)
7+
document in the void-packages GitHub repository.
98

10-
## Section Contents
9+
To contribute to the Void Handbook, read
10+
[CONTRIBUTING](https://github.com/void-linux/void-docs/blob/master/CONTRIBUTING.md)
11+
in the void-docs GitHub repository.
1112

12-
- [Usage Statistics](./usage-statistics.md)
13-
- [Contributing To The void-docs Project](./void-docs/index.md)
13+
If you have any questions, feel free to ask them via IRC in #voidlinux on
14+
irc.freenode.net, or in [the voidlinux
15+
subreddit](https://reddit.com/r/voidlinux).
16+
17+
## Usage Statistics
18+
19+
If you would like to contribute usage reports, the
20+
[PopCorn](https://github.com/the-maldridge/popcorn) program reports installation
21+
statistics back to the Void project. These statistics are purely opt-in -
22+
PopCorn is *not* installed or enabled by default on any Void systems.
23+
24+
*PopCorn* only reports which packages are installed, their version, and the host
25+
CPU architecture (the output of `xuname`). This does not report which services
26+
are enabled, or any other personal information. Individual systems are tracked
27+
persistently by a random (client-generated) UUID, to ensure that each system is
28+
only counted once in each 24-hour sampling period.
29+
30+
The data collected by *PopCorn* is available to view at
31+
<http://popcorn.voidlinux.org>
32+
33+
### Setting up PopCorn
34+
35+
First, install the `PopCorn` package. Then, enable the `popcorn` service, which
36+
will attempt to report statistics once per day.

0 commit comments

Comments
 (0)