annotate llvm/docs/MarkdownQuickstartTemplate.md @ 235:edfff9242030 cbc-llvm13

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 21 Jul 2021 11:30:30 +0900
parents 0572611fdcc8
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # Markdown Quickstart Template
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ## Introduction and Quickstart
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 This document is meant to get you writing documentation as fast as possible
anatofuz
parents:
diff changeset
6 even if you have no previous experience with Markdown. The goal is to take
anatofuz
parents:
diff changeset
7 someone in the state of "I want to write documentation and get it added to
anatofuz
parents:
diff changeset
8 LLVM's docs" and turn that into useful documentation mailed to llvm-commits
anatofuz
parents:
diff changeset
9 with as little nonsense as possible.
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 You can find this document in `docs/MarkdownQuickstartTemplate.md`. You
anatofuz
parents:
diff changeset
12 should copy it, open the new file in your text editor, write your docs, and
anatofuz
parents:
diff changeset
13 then send the new document to llvm-commits for review.
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 Focus on *content*. It is easy to fix the Markdown syntax
anatofuz
parents:
diff changeset
16 later if necessary, although Markdown tries to imitate common
anatofuz
parents:
diff changeset
17 plain-text conventions so it should be quite natural. A basic knowledge of
anatofuz
parents:
diff changeset
18 Markdown syntax is useful when writing the document, so the last
anatofuz
parents:
diff changeset
19 ~half of this document (starting with [Example Section](#example-section)) gives examples
anatofuz
parents:
diff changeset
20 which should cover 99% of use cases.
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 Let me say that again: focus on *content*. But if you really need to verify
anatofuz
parents:
diff changeset
23 Sphinx's output, see `docs/README.txt` for information.
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 Once you have finished with the content, please send the `.md` file to
anatofuz
parents:
diff changeset
26 llvm-commits for review.
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 ## Guidelines
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 Try to answer the following questions in your first section:
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 1. Why would I want to read this document?
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 2. What should I know to be able to follow along with this document?
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 3. What will I have learned by the end of this document?
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 Common names for the first section are `Introduction`, `Overview`, or
anatofuz
parents:
diff changeset
39 `Background`.
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 If possible, make your document a "how to". Give it a name `HowTo*.md`
anatofuz
parents:
diff changeset
42 like the other "how to" documents. This format is usually the easiest
anatofuz
parents:
diff changeset
43 for another person to understand and also the most useful.
anatofuz
parents:
diff changeset
44
anatofuz
parents:
diff changeset
45 You generally should not be writing documentation other than a "how to"
anatofuz
parents:
diff changeset
46 unless there is already a "how to" about your topic. The reason for this
anatofuz
parents:
diff changeset
47 is that without a "how to" document to read first, it is difficult for a
anatofuz
parents:
diff changeset
48 person to understand a more advanced document.
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 Focus on content (yes, I had to say it again).
anatofuz
parents:
diff changeset
51
anatofuz
parents:
diff changeset
52 The rest of this document shows example Markdown markup constructs
anatofuz
parents:
diff changeset
53 that are meant to be read by you in your text editor after you have copied
anatofuz
parents:
diff changeset
54 this file into a new file for the documentation you are about to write.
anatofuz
parents:
diff changeset
55
anatofuz
parents:
diff changeset
56 ## Example Section
anatofuz
parents:
diff changeset
57
anatofuz
parents:
diff changeset
58 Your text can be *emphasized*, **bold**, or `monospace`.
anatofuz
parents:
diff changeset
59
anatofuz
parents:
diff changeset
60 Use blank lines to separate paragraphs.
anatofuz
parents:
diff changeset
61
anatofuz
parents:
diff changeset
62 Headings (like `Example Section` just above) give your document its
anatofuz
parents:
diff changeset
63 structure.
anatofuz
parents:
diff changeset
64
anatofuz
parents:
diff changeset
65 ### Example Subsection
anatofuz
parents:
diff changeset
66
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
67 Make a link [like this](https://llvm.org/). There is also a more
150
anatofuz
parents:
diff changeset
68 sophisticated syntax which [can be more readable] for longer links since
anatofuz
parents:
diff changeset
69 it disrupts the flow less. You can put the `[link name]: <URL>` block
anatofuz
parents:
diff changeset
70 pretty much anywhere later in the document.
anatofuz
parents:
diff changeset
71
anatofuz
parents:
diff changeset
72 [can be more readable]: http://en.wikipedia.org/wiki/LLVM
anatofuz
parents:
diff changeset
73
anatofuz
parents:
diff changeset
74 Lists can be made like this:
anatofuz
parents:
diff changeset
75
anatofuz
parents:
diff changeset
76 1. A list starting with `[0-9].` will be automatically numbered.
anatofuz
parents:
diff changeset
77
anatofuz
parents:
diff changeset
78 1. This is a second list element.
anatofuz
parents:
diff changeset
79
anatofuz
parents:
diff changeset
80 1. Use indentation to create nested lists.
anatofuz
parents:
diff changeset
81
anatofuz
parents:
diff changeset
82 You can also use unordered lists.
anatofuz
parents:
diff changeset
83
anatofuz
parents:
diff changeset
84 * Stuff.
anatofuz
parents:
diff changeset
85
anatofuz
parents:
diff changeset
86 + Deeper stuff.
anatofuz
parents:
diff changeset
87
anatofuz
parents:
diff changeset
88 * More stuff.
anatofuz
parents:
diff changeset
89
anatofuz
parents:
diff changeset
90 #### Example Subsubsection
anatofuz
parents:
diff changeset
91
anatofuz
parents:
diff changeset
92 You can make blocks of code like this:
anatofuz
parents:
diff changeset
93
anatofuz
parents:
diff changeset
94 ```
anatofuz
parents:
diff changeset
95 int main() {
anatofuz
parents:
diff changeset
96 return 0;
anatofuz
parents:
diff changeset
97 }
anatofuz
parents:
diff changeset
98 ```
anatofuz
parents:
diff changeset
99
anatofuz
parents:
diff changeset
100 As an extension to markdown, you can also specify a highlighter to use.
anatofuz
parents:
diff changeset
101
anatofuz
parents:
diff changeset
102 ``` C++
anatofuz
parents:
diff changeset
103 int main() {
anatofuz
parents:
diff changeset
104 return 0;
anatofuz
parents:
diff changeset
105 }
anatofuz
parents:
diff changeset
106 ```
anatofuz
parents:
diff changeset
107
anatofuz
parents:
diff changeset
108 For a shell session, use a `console` code block.
anatofuz
parents:
diff changeset
109
anatofuz
parents:
diff changeset
110 ```console
anatofuz
parents:
diff changeset
111 $ echo "Goodbye cruel world!"
anatofuz
parents:
diff changeset
112 $ rm -rf /
anatofuz
parents:
diff changeset
113 ```
anatofuz
parents:
diff changeset
114
anatofuz
parents:
diff changeset
115 If you need to show LLVM IR use the `llvm` code block.
anatofuz
parents:
diff changeset
116
anatofuz
parents:
diff changeset
117 ``` llvm
anatofuz
parents:
diff changeset
118 define i32 @test1() {
anatofuz
parents:
diff changeset
119 entry:
anatofuz
parents:
diff changeset
120 ret i32 0
anatofuz
parents:
diff changeset
121 }
anatofuz
parents:
diff changeset
122 ```
anatofuz
parents:
diff changeset
123
anatofuz
parents:
diff changeset
124 Some other common code blocks you might need are `c`, `objc`, `make`,
anatofuz
parents:
diff changeset
125 and `cmake`. If you need something beyond that, you can look at the [full
anatofuz
parents:
diff changeset
126 list] of supported code blocks.
anatofuz
parents:
diff changeset
127
anatofuz
parents:
diff changeset
128 [full list]: http://pygments.org/docs/lexers/
anatofuz
parents:
diff changeset
129
anatofuz
parents:
diff changeset
130 However, don't waste time fiddling with syntax highlighting when you could
anatofuz
parents:
diff changeset
131 be adding meaningful content. When in doubt, show preformatted text
anatofuz
parents:
diff changeset
132 without any syntax highlighting like this:
anatofuz
parents:
diff changeset
133
anatofuz
parents:
diff changeset
134 .
anatofuz
parents:
diff changeset
135 +:.
anatofuz
parents:
diff changeset
136 ..:: ::
anatofuz
parents:
diff changeset
137 .++:+:: ::+:.:.
anatofuz
parents:
diff changeset
138 .:+ :
anatofuz
parents:
diff changeset
139 ::.::..:: .+.
anatofuz
parents:
diff changeset
140 ..:+ :: :
anatofuz
parents:
diff changeset
141 ......+:. ..
anatofuz
parents:
diff changeset
142 :++. .. :
anatofuz
parents:
diff changeset
143 .+:::+:: :
anatofuz
parents:
diff changeset
144 .. . .+ ::
anatofuz
parents:
diff changeset
145 +.: .::+.
anatofuz
parents:
diff changeset
146 ...+. .: .
anatofuz
parents:
diff changeset
147 .++:..
anatofuz
parents:
diff changeset
148 ...
anatofuz
parents:
diff changeset
149
anatofuz
parents:
diff changeset
150 ##### Hopefully you won't need to be this deep
anatofuz
parents:
diff changeset
151
anatofuz
parents:
diff changeset
152 If you need to do fancier things than what has been shown in this document,
anatofuz
parents:
diff changeset
153 you can mail the list or check the [Common Mark spec]. Sphinx specific
anatofuz
parents:
diff changeset
154 integration documentation can be found in the [recommonmark docs].
anatofuz
parents:
diff changeset
155
anatofuz
parents:
diff changeset
156 [Common Mark spec]: http://spec.commonmark.org/0.28/
anatofuz
parents:
diff changeset
157 [recommonmark docs]: http://recommonmark.readthedocs.io/en/latest/index.html