]> git.proxmox.com Git - pve-docs.git/blame - markdown-primer.adoc
ceph: ec: fix quoting of params and special values
[pve-docs.git] / markdown-primer.adoc
CommitLineData
44d211d2
TL
1Markdown Primer
2===============
3
4[quote, John Gruber, https://daringfireball.net/projects/markdown/]
5____
6Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you
7to write using an easy-to-read, easy-to-write plain text format, then convert
8it to structurally valid XHTML (or HTML).
9____
10
11The {pve} web-interface has support for using Markdown to rendering rich text
12formatting in node and virtual guest notes.
13
14{pve} supports CommonMark with most extensions of GFM (GitHub Flavoured Markdown),
15like tables or task-lists.
16
17[[markdown_basics]]
18
19Markdown Basics
20---------------
21
22Note that we only describe the basics here, please search the web for more
23extensive resources, for example on https://www.markdownguide.org/
24
25Headings
26~~~~~~~~
27
28----
29# This is a Heading h1
30## This is a Heading h2
31##### This is a Heading h5
32----
33
34
35Emphasis
36~~~~~~~~
37
38Use `*text*` or `_text_` for emphasis.
39
40Use `**text**` or `__text__` for bold, heavy-weight text.
41
42Combinations are also possible, for example:
43
44----
45_You **can** combine them_
46----
47
48Links
49~~~~~
50
51You can use automatic detection of links, for example,
52`https://forum.proxmox.com/` would transform it into a clickable link.
53
54You can also control the link text, for example:
55
56----
57Now, [the part in brackets will be the link text](https://forum.proxmox.com/).
58----
59
60Lists
61~~~~~
62
63Unordered Lists
64^^^^^^^^^^^^^^^
65
66Use `*` or `-` for unordered lists, for example:
67
68----
69* Item 1
70* Item 2
71* Item 2a
72* Item 2b
73----
74
75Adding an indentation can be used to created nested lists.
76
77Ordered Lists
78^^^^^^^^^^^^^
79
80----
811. Item 1
821. Item 2
831. Item 3
84 1. Item 3a
85 1. Item 3b
86----
87
88NOTE: The integer of ordered lists does not need to be correct, they will be numbered automatically.
89
90Task Lists
91^^^^^^^^^^
92
93Task list use a empty box `[ ]` for unfinished tasks and a box with an `X` for finished tasks.
94
95For example:
96
97----
98- [X] First task already done!
99- [X] Second one too
100- [ ] This one is still to-do
101- [ ] So is this one
102----
103
104Tables
105~~~~~~
106
107Tables use the pipe symbol `|` to separate columns, and `-` to separate the
108table header from the table body, in that separation one can also set the text
109alignment, making one column left-, center-, or right-aligned.
110
111----
112| Left columns | Right columns | Some | More | Cols.| Centering Works Too
113| ------------- |--------------:|--------|------|------|:------------------:|
114| left foo | right foo | First | Row | Here | >center< |
115| left bar | right bar | Second | Row | Here | 12345 |
116| left baz | right baz | Third | Row | Here | Test |
117| left zab | right zab | Fourth | Row | Here | ☁️☁️☁️ |
118| left rab | right rab | And | Last | Here | The End |
119----
120
121Note that you do not need to align the columns nicely with white space, but that makes
122editing tables easier.
123
124Block Quotes
125~~~~~~~~~~~~
126
127You can enter block quotes by prefixing a line with `>`, similar as in plain-text emails.
128
129----
130> Markdown is a lightweight markup language with plain-text-formatting syntax,
131> created in 2004 by John Gruber with Aaron Swartz.
132>
133>> Markdown is often used to format readme files, for writing messages in online discussion forums,
134>> and to create rich text using a plain text editor.
135----
136
137
138Code and Snippets
139~~~~~~~~~~~~~~~~~
140
141You can use backticks to avoid processing for a few word or paragraphs. That is useful for
142avoiding that a code or configuration hunk gets mistakenly interpreted as markdown.
143
144Inline code
145^^^^^^^^^^^
146
147Surrounding part of a line with single backticks allows to write code inline,
148for examples:
149
150----
151This hosts IP address is `10.0.0.1`.
152----
153
154Whole blocks of code
155^^^^^^^^^^^^^^^^^^^^
156
157For code blocks spanning several lines you can use triple-backticks to start
158and end such a block, for example:
159
160----
161```
162# This is the network config I want to remember here
163auto vmbr2
164iface vmbr2 inet static
165 address 10.0.0.1/24
166 bridge-ports ens20
167 bridge-stp off
168 bridge-fd 0
169 bridge-vlan-aware yes
170 bridge-vids 2-4094
171
172```
173----
174