aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/fdp-primer/overview/_index.adoc
blob: 2b72b0c23e5c1de3d842a520309025db7e40691b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
---
title: Chapter 1. Overview
prev: books/fdp-primer/preface
next: books/fdp-primer/tools
description: Overview about the FreeBSD Documentation Process
tags: ["overview", "FreeBSD Documentation Project", "quick start"]
showBookMenu: true
weight: 2
params:
  path: "/books/fdp-primer/overview/"
---

[[overview]]
= Overview
:doctype: book
:toc: macro
:toclevels: 1
:icons: font
:sectnums:
:sectnumlevels: 6
:sectnumoffset: 1
:partnums:
:source-highlighter: rouge
:experimental:
:images-path: books/fdp-primer/

ifdef::env-beastie[]
ifdef::backend-html5[]
:imagesdir: ../../../../images/{images-path}
endif::[]
ifndef::book[]
include::shared/authors.adoc[]
include::shared/mirrors.adoc[]
include::shared/releases.adoc[]
include::shared/attributes/attributes-{{% lang %}}.adoc[]
include::shared/{{% lang %}}/teams.adoc[]
include::shared/{{% lang %}}/mailing-lists.adoc[]
include::shared/{{% lang %}}/urls.adoc[]
toc::[]
endif::[]
ifdef::backend-pdf,backend-epub3[]
include::../../../../../shared/asciidoctor.adoc[]
endif::[]
endif::[]

ifndef::env-beastie[]
toc::[]
include::../../../../../shared/asciidoctor.adoc[]
endif::[]

Welcome to the FreeBSD Documentation Project (FDP).
Quality documentation is crucial to the success of FreeBSD, and we value your contributions very highly.

This document describes how the FDP is organized, how to write and submit documentation, and how to effectively use the available tools.

Everyone is welcome to contribute to the FDP.
Willingness to contribute is the only membership requirement.

This primer shows how to:

* Understand the role of documentation and its place in the ecosystem.
* Identify which parts of FreeBSD are maintained by the FDP.
* Install the required documentation tools and files.
* Make changes to the documentation.
* Submit changes back for review and inclusion in the FreeBSD documentation.

[[overview-documentation-ecosystem]]
== Documentation in the FreeBSD Ecosystem

All documents are for the benefit of their readers, not their writers or caretakers.
They should adapt to the reader and not expect the reader to adapt to them.

Never blame the reader for:

* being unable to make use of a document easily or at all
* finding a document confusing
* not understanding a document or how to apply it
* not finding an explicit answer or successfully bridging gaps (or connecting dots) to reason their way to one

Instead, acknowledge that the document is:

* inaccessible
* confusing
* hard to understand or apply
* incomplete

Then, make the document:

* more accessible
* less confusing
* clearer
* more complete

Use the following methods:

* apply link:https://webaim.org/intro/#principles[accessibility best practices] to correct the problem reported and any similar ones you find
* rework or clarify the confusing structure or language
* add relevant examples to the part that is hard to understand or apply
* fill in the gaps or add the missing stepping stones

[[overview-quick-start]]
== Quick Start

Some preparatory steps must be taken before editing the FreeBSD documentation.
First, subscribe to the {freebsd-doc}.
Some team members also interact on the `#bsddocs` IRC channel on http://www.efnet.org/[EFnet].
These people can help with questions or problems involving the documentation.

[[freebsd-installation-process]]
=== FreeBSD installation process

[.procedure]
====
. Install these packages. The `docproj` _meta-port_ installs all the applications required to do useful work with the FreeBSD documentation.
+
[source,shell]
....
# pkg install docproj
....
+
. Install a local working copy of the documentation from the FreeBSD repository in [.filename]#~/doc# (see crossref:working-copy[working-copy,The Working Copy]).
+
[source,shell]
....
% git clone https://git.FreeBSD.org/doc.git ~/doc
....
+
. Edit the documentation files that require changes. If a file needs major changes, consult the mailing list for input.
+
Review the output and edit the file to fix any problems shown, then rerun the command to find any remaining problems.
Repeat until all of the errors are resolved.
+
. *_Always_* build and review the changes before submitting them. Running `make` in the `documentation` or `website` subdirectories will generate the documentation in HTML format.
+
[source,shell]
....
% make
....
+
To reduce compile time, only one language can be compiled:
+
[source,shell]
....
% make DOC_LANG=en
....
+
The build output is stored in [.filename]#~/doc/documentation/public/en/articles/# and [.filename]#~/doc/documentation/public/en/books/#.
+
. Review the build output and ensure the edits are free from typos, layout problems, or errors. If any errors are found during the build process, edit the problematic files to fix any issues that show up, then run the build command again until all errors are resolved.
+
. Add all the files with `git add .`, then review the diff with `git diff`. For example:
+
[source,shell]
....
% git add .
% git diff --staged
....
+
Make sure that all required files are included, then commit the change to your local branch and generate a patch with `git format-patch`
+
[source,shell]
....
% git commit
% git format-patch origin/main
....
+
Patch generated with `git format-patch` will include author identity and email addresses,
making it easier for developers to apply (with `git am`) and give proper credit.
+
[IMPORTANT]
======
To make it easier for committers to apply the patch on their working copy of the documentation tree,
please generate the [.filename]#.diff# from the base of your documentation tree.
======
+
In the example above, changes have been made to the *bsdinstall* portion of the Handbook.
+
. Submit the patch or diff file using the web-based https://bugs.FreeBSD.org/bugzilla/enter_bug.cgi?product=Documentation[Problem Report] system. If using the web form, enter a Summary of _[patch] short description of problem_. Select the Component `Documentation`. In the Description field, enter a short description of the changes and any important details about them. Use the btn:[Add an attachment] button to attach the patch or diff file. Finally, use the btn:[Submit Bug] button to submit your diff to the problem report system.
====

[[gnu-linux-installation-process]]
=== GNU/Linux installation process

[.procedure]
====
. Install these packages in apt-based systems like Debian or Ubuntu.
On other GNU/Linux distributions the package names may change.
Consult your distribution's package manager if in doubt.
+
[source,shell]
....
# apt install hugo ruby-asciidoctor ruby-asciidoctor-pdf ruby-rouge git bmake
....
+
. Install a local working copy of the documentation from the FreeBSD repository in [.filename]#~/doc# (see crossref:working-copy[working-copy,The Working Copy]).
+
[source,shell]
....
% git clone https://git.FreeBSD.org/doc.git ~/doc
....
+
. Edit the documentation files that require changes. If a file needs major changes, consult the mailing list for input.
+
Review the output and edit the files to fix any problems shown, then rerun the command to find any remaining problems.
Repeat until all of the errors are resolved.
+
. Always build and test the changes before submitting them. Running `bmake` in the `documentation` or `website` subdirectories will generate the documentation in HTML format.
+
[source,shell]
....
% bmake run LOCALBASE=/usr
....
+
. Add all the files with `git add .`, then review the diff with `git diff`. For example:
+
[source,shell]
....
% git add .
% git diff --staged
....
+
Make sure that all required files are included, then commit the change to your local branch and generate a patch with `git format-patch`
+
[source,shell]
....
% git commit
% git format-patch origin/main
....
+
Patch generated with `git format-patch` will include author identity and email addresses,
making it easier for developers to apply (with `git am`) and give proper credit.
+
[IMPORTANT]
======
To make it easier for committers to apply the patch on their working copy of the documentation tree,
please generate the [.filename]#.diff# from the base of your documentation tree.
======
+
. Submit the patch or diff file using the web-based https://bugs.FreeBSD.org/bugzilla/enter_bug.cgi?product=Documentation[Problem Report] system.
If using the web form, enter a Summary of _short description of problem_.
Select the Component `Documentation`.
In the Description field, enter a short description of the problem in the _Summary_ field and add _patch_ to the _Keywords_ field.
Use the btn:[Add an attachment] button to attach the patch or diff file.
Finally, use the btn:[Submit Bug] button to submit your diff to the problem report system.
====

[[mac-os-installation-process]]
=== macOS(R) installation process

[.procedure]
====

. Install these packages using link:https://brew.sh/[Homebrew] and link:https://rubygems.org/[RubyGem].
+
[source,shell]
....
$ brew install hugo ruby git bmake
....
+
. Add Ruby to the Path.
+
[source,shell]
....
$ echo 'export PATH="$(brew --prefix ruby)/bin:$PATH"' >> ~/.zshrc
$ echo 'export PATH="$(brew --prefix hugo)/bin:$PATH"' >> ~/.zshrc
$ echo 'export GEM_PATH="$(gem environment gemdir)"' >> ~/.zshrc
$ echo 'export PATH="${GEM_PATH}/bin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc
....
. Install the rouge package using RubyGem.
+
[source,shell]
....
$ sudo gem install rouge asciidoctor asciidoctor-pdf asciidoctor-epub3
....
+
. Install a local working copy of the documentation from the FreeBSD repository in [.filename]#~/doc# (see crossref:working-copy[working-copy,The Working Copy]).
+
[source,shell]
....
$ git clone https://git.FreeBSD.org/doc.git ~/doc
....
+
. Edit the documentation files that require changes. If a file needs major changes, consult the mailing list for input.
+
Review the output and edit the files to fix any problems shown, then rerun the command to find any remaining problems.
Repeat until all of the errors are resolved.
+
. Always build and test the changes before submitting them. Running `bmake` in the `documentation` or `website` subdirectories will generate the documentation in HTML format.
+
[source,shell]
....
$ bmake run USE_RUBYGEMS=YES RUBY_CMD=$(brew --prefix ruby)/bin/ruby
....
. Add all the files with `git add .`, then review the diff with `git diff`. For example:
+
[source,shell]
....
% git add .
% git diff --staged
....
+
Make sure that all required files are included, then commit the change to your local branch and generate a patch with `git format-patch`
+
[source,shell]
....
% git commit
% git format-patch origin/main
....
+
Patch generated with `git format-patch` will include author identity and email addresses,
making it easier for developers to apply (with `git am`) and give proper credit.
+
[IMPORTANT]
======
To make it easier for committers to apply the patch on their working copy of the documentation tree,
please generate the [.filename]#.diff# from the base of your documentation tree.
======
+
. Submit the patch or diff file using the web-based https://bugs.FreeBSD.org/bugzilla/enter_bug.cgi?product=Documentation[Problem Report] system.
If using the web form, enter a Summary of _short description of problem_.
Select the Component `Documentation`.
In the Description field, enter a short description of the problem in the _Summary_ field and add _patch_ to the _Keywords_ field.
Use the btn:[Add an attachment] button to attach the patch or diff file.
Finally, use the btn:[Submit Bug] button to submit your diff to the problem report system.
====

[[overview-doc]]
== The FreeBSD Documentation Set

The FDP is responsible for four categories of FreeBSD documentation.

* _Handbook_: The Handbook is the comprehensive online resource and reference for FreeBSD users.
* _FAQ_: The FAQ uses a short question and answer format to address questions that are frequently asked on the various mailing lists and forums devoted to FreeBSD. This format does not permit long and comprehensive answers.
* _Manual pages_: The English language system manual pages are usually not written by the FDP, as they are part of the base system. However, the FDP can reword parts of existing manual pages to make them clearer or to correct inaccuracies.
* _Web site_: This is the main FreeBSD presence on the web, visible at https://www.freebsd.org/[https://www.FreeBSD.org/] and many mirrors around the world. The web site is typically a new user's first exposure to FreeBSD.

Translation teams are responsible for translating the Handbook and web site into different languages.
Manual pages are not translated at present.

Documentation source for the FreeBSD web site, Handbook, and FAQ is available in the documentation repository at `https://cgit.freebsd.org/doc/`.

Source for manual pages is available in a separate source repository located at `https://cgit.freebsd.org/src/`.

Documentation commit messages are visible with `git log`.
Commit messages are also archived at link:{dev-commits-doc-all}.

Web frontends to both of these repositories are available at https://cgit.freebsd.org/doc/[] and https://cgit.freebsd.org/src/[].

Many people have written tutorials or how-to articles about FreeBSD.
Some are stored as part of the FDP files.
In other cases, the author has decided to keep the documentation separate.
The FDP endeavors to provide links to as much of this external documentation as possible.