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