]> git.proxmox.com Git - pve-docs.git/blame_incremental - README.adoc
qemu: add cpu models documentation
[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 'tips', 'notes', 'warnings' and 'important' information
237can be created by starting a paragraph with `TIP`, `NOTE:`, `WARNING:` or
238`IMPORTANT:`:
239
240TIP: this is a tip
241
242NOTE: this is a note
243
244WARNING: this is warning
245
246IMPORTANT: this is important information
247
248For each of these blocks (including lists and paragraphs), a block header
249can be defined by prepending the block with a `.' character and the header
250text:
251
252-----
253.Title of List
254* First element
255* Second element
256* Third element
257-----
258
259.Title of List
260* First element
261* Second element
262* Third element
263
264For example, block headers can be used to add file names/paths to file
265content listings.
266
267
268Online Help
269-----------
270Each {pve} installation contains the full documentation in HTML format,
271which is then used as the target of various help buttons in the GUI.
272
273If after adding a specific entry in the documentation you want to
274create a help button pointing to that, you need to do the
275following:
276
277* add a string id in double square brackets before your
278documentation entry, like `[[qm_general_settings]]`
279* rebuild the `asciidoc-pve` script and the HTML chapter file containing
280your entry
281* add a property `onlineHelp` in the ExtJS panel you want to document,
282using the above string, like `onlineHelp: qm_general_settings`
283This panel has to be a child class of PVE.panel.InputPanel
284
285On calling `make install` the asciidoc-pve script will populate
286a JS object associating the string id and a link to the
287local HTML documentation, and the help button of your input panel
288will point to this link.
289
290
291Screenshots
292-----------
293
294[thumbnail="screenshot/gui-datacenter-search.png"]
295
296First, it should be noted that we can display screenshots on 'html'
297and 'wiki' pages, and we can include them in printed documentation. But
298it is not possible to render them inside manual pages. So screenshot
299inside manual pages should be optional, i.e. the text should not
300depend on the visibility of the screenshot. You can include a
301screenshot by setting the 'thumbnail' attribute on a paragraph:
302
303----
304[thumbnail="screenshot/gui-datacenter-search.png"]
305First, it should be noted ...
306----
307
308The corresponding file need to reside inside folder
309`images/screenshot`, and should be in `.png` image format. We include
310the screenshots in printed documentation, and 'pdftex' uses the
311density (DPI) specified inside the file. So all screenshots should use
312the same density. We currently require the density set to 146 DPI, so
313that we can display a 1024 pixels wide image. You should not include
314larger screenshots (although it is possible).
315
316You can use the `./png-cleanup.pl` script to set the correct
317density. Simply use the following command to import a screenshot
318image:
319
320----
321# ./png-cleanup.pl screenshot.png images/screenshot/screenshot.png
322----
323
324TIP: You can use `identify -verbose screenshot.png` command to show
325all image attributes (from debian package 'imagemagick')
326
327.Default Screenshot Layout
328
329[thumbnail="screenshot/gui-datacenter-search.png"]
330
331We normally display screenshots as small thumbnail on the right side
332of a paragraph. On printed documentation, we render the full sized
333graphic just before the paragraph, or between the title and the text
334if the paragraph has a title. It is usually a good idea to add a title
335to paragraph with screenshots.
336
337[thumbnail="screenshot/gui-datacenter-search.png", float="left"]
338
339If you need to render many screenshots, it is possible to place them
340on the left side, so you can alternate the thumbnail position using the
341`float` attribute:
342
343----
344[thumbnail="screenshot/gui-datacenter-search.png", float="left"]
345If you need to render many screenshots ...
346----
347
348Please avoid to many consecutive screenshots to avoid rendering
349problems. Also verify the printed documentation to see if large
350screenshots create layout problems.
351
352
353Copyright
354---------
355
356Copyright (C) 2016-2021 Proxmox Server Solutions GmbH
357
358Permission is granted to copy, distribute and/or modify this document
359under the terms of the GNU Free Documentation License, Version 1.3 or
360any later version published by the Free Software Foundation; with no
361Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
362copy of the license is included in the link:LICENSE[LICENSE] file.