]> git.proxmox.com Git - pve-docs.git/blame_incremental - README.adoc
totp: fix copy/paste mistake
[pve-docs.git] / README.adoc
... / ...
CommitLineData
1Proxmox VE Documentation
2========================
3
4We try to generate high quality documentation for
5{website}[{pve}], and choose to use
6http://www.methods.co.nz/asciidoc/[AsciiDoc] as base format.
7
8The basic idea is to generate high quality manual pages, and assemble
9them into a complete book, called link:pve-admin-guide.adoc[Proxmox VE
10Administration Guide]. So we have one source, and generate several
11documents from that. It is also possible to generate printable PDF
12files, or ebook formats ('.epub').
13
14When possible, we provide scripts to extract API definitions,
15configuration or command line options from the source code.
16
17To simplify the documentation task, we keep all Documentation within
18this repository. It is possible to generate the docs without installing
19any additional Proxmox packages with:
20
21 make pve-doc-generator.mk
22 make index
23
24To update the auto-generate API definitions use:
25
26 make update
27
28NOTE: you need a fully installed development environment for that.
29
30
31Debian Packages
32---------------
33
34We generate a development package called 'pve-doc-generator', which is
35used by other Proxmox VE package to generate manual pages at package
36build time.
37
38Another package called 'pve-docs' is used to publish generated
39'.html' and '.pdf' files on our web servers. You can generate
40those Debian packages using:
41
42 make deb
43
44
45Common Macro definition in link:asciidoc/asciidoc-pve.conf[]
46------------------------------------------------------------
47
48'asciidoc' allows us to define common macros, which can then be
49referred to using `{macro}`. We try to use this mechanism to improve
50consistency. For example, we defined a macro called `pve`, which
51expands to "Proxmox VE".
52
53For URLs which are used more than once, two macros should be defined:
54
55* `{name-url}`, which just contains the http(s) URL
56* `{name}`, which contains the complete link including the canonical
57description
58
59For example, the macro `{forum-url}` expands to {forum-url}, and the macro
60`{forum}` expands to {forum}.
61
62The plan is to add more such definitions for terms which are used more
63than once.
64
65WARNING: When asciidoc encounters a misspelled macro name, it will
66silently drop the containing line!
67
68
69Autogenerated CLI Command Synopsis
70----------------------------------
71
72We generate the command line synopsis for all manual pages
73automatically. We can do that, because we have a full declarative
74definition of the {pve} API. I added those generated files
75('*-synopsis.adoc') to the git repository, so that it is possible to
76build the documentation without having a fully installed {pve}
77development environment.
78
79Style Guide
80-----------
81
82'asciidoc' uses a fairly simple markup syntax for formatting content.
83The following basic principles should be followed throughout our
84documentation.
85
86
87Sections
88~~~~~~~~
89
90Sections are formatted using `two-line titles', by adding a line of
91the appropriate characters and of the same length as the section title
92below the title text:
93
94 Level 0 (top level): ======================
95 Level 1: ----------------------
96 Level 2: ~~~~~~~~~~~~~~~~~~~~~~
97 Level 3: ^^^^^^^^^^^^^^^^^^^^^^
98 Level 4 (bottom level): ++++++++++++++++++++++
99
100NOTE: Level 4 headings are currently not working for `manpage` outputs, you may
101want to use `.SECTION' instead, which results in the same rendering, and this
102level of Heading isn't displayed in any Index/TOC anyway.
103
104Section titles should always be preceded by two empty lines. Each word
105in a title should be capitalized except for ``articles, coordinating
106conjunctions, prepositions, and the word to in infinitives unless they
107appear as the first or last word of a title'' (see
108http://web.mit.edu/course/21/21.guide/capitals.htm[Mayfield Electronic Handbook of Technical & Scientific Writing]).
109
110
111Lists
112~~~~~
113
114Numbered Lists
115^^^^^^^^^^^^^^
116
117Numbered lists should be created using the implicit numbering format:
118
119-----
120. First level
121.. Second level
122. First level again
123-----
124
125. First level
126.. Second level
127. First level again
128
129
130Bulleted Lists
131^^^^^^^^^^^^^^
132
133Bulleted lists should be created using the '*' symbol:
134
135-----
136* First level
137** Second level
138* First level again
139-----
140
141* First level
142** Second level
143* First level again
144
145
146If you need to have other elements on the same level as a list element you
147can do this with the '+' symbol:
148
149----
150. First level
151.. Second level
152+
153Another Sentence (or Block) on the continued second level.
154. First level again
155----
156
157. First level
158.. Second level
159+
160Another Sentence (or Block) on the continued second level.
161
162. First level again
163
164Labeled Lists
165^^^^^^^^^^^^^
166
167Labeled lists should be used to make lists of key-value style text
168more readable, such as command line parameters or configuration options:
169
170.Regular labeled lists
171-----
172First Label Text::
173
174Element text paragraph
175
176Second Label Text::
177
178Another element text paragraph.
179-----
180
181First Label Text::
182
183Element text paragraph
184
185Second Label Text::
186
187Another element text paragraph.
188
189.Horizontal labeled lists
190-----
191[horizontal]
192First Label Text:: Element text paragraph
193
194Second Label Text:: Another element text paragraph.
195-----
196
197creates
198
199[horizontal]
200First Label Text:: Element text paragraph
201
202Second Label Text:: Another element text paragraph.
203
204The FAQ section uses a special questions and answers style for
205labeled lists.
206
207
208Text and Block Styles
209~~~~~~~~~~~~~~~~~~~~~
210
211'asciidoc' offers a wide range of default text styles:
212
213* 'Emphasized text': created using \'text', used for emphasizing words
214and phrases
215* `Monospaced text`: created using \`text`, used for command / program
216names, file paths, in-line commands, option names and values
217* *Strong text*: created using \*text*, used for emphasizing concepts
218or names when first introduced in a section.
219
220There are also different built-in block styles that are used in
221our documentation:
222
223Complete paragraphs can be included literally by prepending each
224of their lines with whitespace. Use this for formatting complete
225commands on their own line, such as:
226
227 pct set ID -option value
228
229----
230By surrounding a paragraph with lines containing at least four '-'
231characters, its content is formatted as listing.
232
233Use this for formatting file contents or command output.
234----
235
236Specially highlighted 'notes', 'warnings' and 'important' information
237can be created by starting a paragraph with `NOTE:`, `WARNING:` or
238`IMPORTANT:`:
239
240NOTE: this is a note
241
242WARNING: this is warning
243
244IMPORTANT: this is important information
245
246For each of these blocks (including lists and paragraphs), a block header
247can be defined by prepending the block with a `.' character and the header
248text:
249
250-----
251.Title of List
252* First element
253* Second element
254* Third element
255-----
256
257.Title of List
258* First element
259* Second element
260* Third element
261
262For example, block headers can be used to add file names/paths to file
263content listings.
264
265
266Online Help
267-----------
268Each {pve} installation contains the full documentation in HTML format,
269which is then used as the target of various help buttons in the GUI.
270
271If after adding a specific entry in the documentation you want to
272create a help button pointing to that, you need to do the
273following:
274
275* add a string id in double square brackets before your
276documentation entry, like `[[qm_general_settings]]`
277* rebuild the `asciidoc-pve` script and the HTML chapter file containing
278your entry
279* add a property `onlineHelp` in the ExtJS panel you want to document,
280using the above string, like `onlineHelp: qm_general_settings`
281This panel has to be a child class of PVE.panel.InputPanel
282
283On calling `make install` the asciidoc-pve script will populate
284a JS object associating the string id and a link to the
285local HTML documentation, and the help button of your input panel
286will point to this link.
287
288
289Screenshots
290-----------
291
292[thumbnail="screenshot/gui-datacenter-search.png"]
293
294First, it should be noted that we can display screenshots on 'html'
295and 'wiki' pages, and we can include them in printed documentation. But
296it is not possible to render them inside manual pages. So screenshot
297inside manual pages should be optional, i.e. the text should not
298depend on the visibility of the screenshot. You can include a
299screenshot by setting the 'thumbnail' attribute on a paragraph:
300
301----
302[thumbnail="screenshot/gui-datacenter-search.png"]
303First, it should be noted ...
304----
305
306The corresponding file need to reside inside folder
307`images/screenshot`, and should be in `.png` image format. We include
308the screenshots in printed documentation, and 'pdftex' uses the
309density (DPI) specified inside the file. So all screenshots should use
310the same density. We currently require the density set to 146 DPI, so
311that we can display a 1024 pixels wide image. You should not include
312larger screenshots (although it is possible).
313
314You can use the `./png-cleanup.pl` script to set the correct
315density. Simply use the following command to import a screenshot
316image:
317
318----
319# ./png-cleanup.pl screenshot.png images/screenshot/screenshot.png
320----
321
322TIP: You can use `identify -verbose screenshot.png` command to show
323all image attributes (from debian package 'imagemagick')
324
325.Default Screenshot Layout
326
327[thumbnail="screenshot/gui-datacenter-search.png"]
328
329We normally display screenshots as small thumbnail on the right side
330of a paragraph. On printed documentation, we render the full sized
331graphic just before the paragraph, or between the title and the text
332if the paragraph has a title. It is usually a good idea to add a title
333to paragraph with screenshots.
334
335[thumbnail="screenshot/gui-datacenter-search.png", float="left"]
336
337If you need to render many screenshots, it is possible to place them
338on the left side, so you can alternate the thumbnail position using the
339`float` attribute:
340
341----
342[thumbnail="screenshot/gui-datacenter-search.png", float="left"]
343If you need to render many screenshots ...
344----
345
346Please avoid to many consecutive screenshots to avoid rendering
347problems. Also verify the printed documentation to see if large
348screenshots create layout problems.
349
350
351Copyright
352---------
353
354Copyright (C) 2016-2019 Proxmox Server Solutions Gmbh
355
356Permission is granted to copy, distribute and/or modify this document
357under the terms of the GNU Free Documentation License, Version 1.3 or
358any later version published by the Free Software Foundation; with no
359Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
360copy of the license is included in the link:LICENSE[LICENSE] file.