]> git.proxmox.com Git - pve-docs.git/blame - README.adoc
README.adoc: explain howto include screenshots
[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
9d17dbac 99Section titles should always be preceded by two empty lines. Each word
d067c2ad
FG
100in a title should be capitalized except for ``articles, coordinating
101conjunctions, prepositions, and the word to in infinitives unless they
102appear as the first or last word of a title'' (see
103http://web.mit.edu/course/21/21.guide/capitals.htm[Mayfield Electronic Handbook of Technical & Scientific Writing]).
104
105
106Lists
107~~~~~
108
109Numbered Lists
110^^^^^^^^^^^^^^
111
112Numbered lists should be created using the implicit numbering format:
113
114-----
115. First level
116.. Second level
117. First level again
118-----
119
120. First level
121.. Second level
122. First level again
123
124
125Bulleted Lists
126^^^^^^^^^^^^^^
127
128Bulleted lists should be created using the '*' symbol:
129
130-----
131* First level
132** Second level
133* First level again
134-----
135
136* First level
137** Second level
138* First level again
139
140
141Labeled Lists
142^^^^^^^^^^^^^
143
144Labeled lists should be used to make lists of key-value style text
9d17dbac 145more readable, such as command line parameters or configuration options:
d067c2ad
FG
146
147.Regular labeled lists
148-----
149First Label Text::
150
151Element text paragraph
152
153Second Label Text::
154
155Another element text paragraph.
156-----
157
158First Label Text::
159
160Element text paragraph
161
162Second Label Text::
163
164Another element text paragraph.
165
166.Horizontal labeled lists
167-----
168[horizontal]
169First Label Text:: Element text paragraph
170
171Second Label Text:: Another element text paragraph.
172-----
173
174creates
175
176[horizontal]
177First Label Text:: Element text paragraph
178
179Second Label Text:: Another element text paragraph.
180
181The FAQ section uses a special questions and answers style for
182labeled lists.
183
184
185Text and Block Styles
186~~~~~~~~~~~~~~~~~~~~~
187
188'asciidoc' offers a wide range of default text styles:
189
190* 'Emphasized text': created using \'text', used for emphasizing words
191and phrases
192* `Monospaced text`: created using \`text`, used for command / program
128b18c0 193names, file paths, in-line commands, option names and values
d067c2ad
FG
194* *Strong text*: created using \*text*, used for emphasizing concepts
195or names when first introduced in a section.
196
128b18c0 197There are also different built-in block styles that are used in
d067c2ad
FG
198our documentation:
199
200Complete paragraphs can be included literally by prepending each
201of their lines with whitespace. Use this for formatting complete
202commands on their own line, such as:
203
204 pct set ID -option value
205
206----
207By surrounding a paragraph with lines containing at least four '-'
208characters, its content is formatted as listing.
209
210Use this for formatting file contents or command output.
211----
212
213Specially highlighted 'notes', 'warnings' and 'important' information
214can be created by starting a paragraph with `NOTE:`, `WARNING:` or
215`IMPORTANT:`:
216
217NOTE: this is a note
218
219WARNING: this is warning
220
221IMPORTANT: this is important information
222
223For each of these blocks (including lists and paragraphs), a block header
224can be defined by prepending the block with a `.' character and the header
225text:
226
227-----
228.Title of List
229* First element
230* Second element
231* Third element
232-----
233
234.Title of List
235* First element
236* Second element
237* Third element
238
239For example, block headers can be used to add file names/paths to file
240content listings.
241
0d1b9a16
DM
242Screenshots
243-----------
244
245[thumbnail="gui-datacenter-search.png"]
246
247First, it should be noted that we can display screenshots on 'html'
248and 'wiki' pages, and we can include them in printed doumentation. But
249ith is not possible to render them inside manual pages. So screenshot
250inside manual pages should be optional, i.e. the text should not
251depend on the visibility of the screenshot. You can include a
252screenshot by setting the 'thumbnail' attribute on a paragraph:
253
254----
255[thumbnail="gui-datacenter-search.png"]
256First, it should be noted ...
257----
258
259
260
d067c2ad 261
22b0b166
DM
262Copyright
263---------
264
40152dfd 265Copyright (C) 2016 Proxmox Server Solutions Gmbh
22b0b166
DM
266
267Permission is granted to copy, distribute and/or modify this document
268under the terms of the GNU Free Documentation License, Version 1.3 or
269any later version published by the Free Software Foundation; with no
f1e6bbae
DM
270Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
271copy of the license is included in the link:LICENSE[LICENSE] file.